Problems Panda3D install on mac OS X 10.9

Hi all,

I am trying to install Panda3D on Mac OS X 10.9 from the Panda3D-1.9.0.dmg file.
I have python 2.7 (64 bits).
Here is the error I have when running the example “Asteroid” with

ppython main.py
DirectStart: Starting the game.
Traceback (most recent call last):
  File "main.py", line 13, in <module>
    import direct.directbase.DirectStart
  File "/Developer/Panda3D/direct/directbase/DirectStart.py", line 3, in <module>
    from direct.showbase import ShowBase
  File "/Developer/Panda3D/direct/showbase/ShowBase.py", line 10, in <module>
    from pandac.PandaModules import *
  File "/Developer/Panda3D/pandac/PandaModules.py", line 2, in <module>
    from panda3dCoreModules import *
  File "/Developer/Panda3D/pandac/panda3dCoreModules.py", line 1, in <module>
    from extension_native_helpers import *
  File "/Developer/Panda3D/pandac/extension_native_helpers.py", line 105, in <module>
    from panda3d.core import *
ImportError: dlopen(/Developer/Panda3D/panda3d/core.so, 2): Library not loaded: @executable_path/../Frameworks/Cg.framework/Cg
  Referenced from: /Developer/Panda3D/lib/libpanda.1.9.dylib
  Reason: image not found

I have tried a lot of things found on this forum (and many other) but nothing works…
Someone could help ?
Thank you very much,

Cheers

Install the NVIDIA Cg Toolkit from the site:
developer.nvidia.com/cg-toolkit-download

I have installed the NVIDIA Cg Toolkit. Here is the error I have when running the “Asteroid” Example:

DirectStart: Starting the game.
Known pipe types:
(all display modules loaded.)
Traceback (most recent call last):
  File "main.py", line 13, in <module>
    import direct.directbase.DirectStart
  File "/Developer/Panda3D/direct/directbase/DirectStart.py", line 4, in <module>
    base = ShowBase.ShowBase()
  File "/Developer/Panda3D/direct/showbase/ShowBase.py", line 244, in __init__
    self.openDefaultWindow(startDirect = False, props=props)
  File "/Developer/Panda3D/direct/showbase/ShowBase.py", line 887, in openDefaultWindow
    self.openMainWindow(*args, **kw)
  File "/Developer/Panda3D/direct/showbase/ShowBase.py", line 923, in openMainWindow
    self.openWindow(*args, **kw)
  File "/Developer/Panda3D/direct/showbase/ShowBase.py", line 637, in openWindow
    win = func()
  File "/Developer/Panda3D/direct/showbase/ShowBase.py", line 623, in <lambda>
    callbackWindowDict = callbackWindowDict)
  File "/Developer/Panda3D/direct/showbase/ShowBase.py", line 689, in _doOpenWindow
    self.makeDefaultPipe()
  File "/Developer/Panda3D/direct/showbase/ShowBase.py", line 527, in makeDefaultPipe
    "No graphics pipe is available!\n"
  File "/Developer/Panda3D/direct/directnotify/Notifier.py", line 136, in error
    raise exception(errorString)
StandardError: No graphics pipe is available!
Your Config.prc file must name at least one valid panda display
library via load-display or aux-display.
:TaskManager: TaskManager.destroy()

It seems that I have a problem with my path, but don’t know how to solve that.
I tried:

>>> from pandac.PandaModules import * 
>>> print getPluginPath() 
<auto>
>>> print repr(getPluginPath())
<auto>
>>> print ConfigPageManager.getGlobalPtr().getSearchPath()
/usr/local/p1/etc

But /usr/local/p1/etc/ does not exists !!!

Check this thread:

Thank you very much !!!
It works !

Hi all,

Sorry to be here again !
My problem was solved. I can now run all the Panda3D examples.
However, I am using a python code importing numpy which create a panda3D interface.
My problem now is that when I run my code with ppython I have the following error:

ImportError: No module named numpy

And when I run my code with python, I have a seg fault due to

from direct.showbase.ShowBase import ShowBase

:

I have copied the Panda3D.pth file in /Library/Python/2.7/site-packages/

I don’t know where is the problem.

Thank you very much for your help.

Just one precision:

I also copied the Panda3D.pth file in :
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/

where all the python lib are

You have to install numpy in the same Python installation where Panda is installed, ie. into the system Python 2.7 installation.

I am trying to install panda3D from source as you proposed with python 2.7.
I always have an error when I run

python makepanda/makepanda.py --everything --installer --no-ffmpeg --no-vrpn --no-rocket --no-opencv --no-gles --no-gles2 --no-egl

Here is the error:

 [ 46%] Building C++ object built/tmp/p3glgsg_config_glgsg.o
In file included from panda/src/glgsg/config_glgsg.cxx:16:
In file included from panda/src/glgsg/glgsg.h:86:
built/include/panda_glext.h:3411:22: error: typedef redefinition with different types
      ('unsigned int' vs 'void *')
typedef unsigned int GLhandleARB;   /* shader object handle */
                     ^
/System/Library/Frameworks/OpenGL.framework/Headers/gltypes.h:65:15: note: previous definition is
      here
typedef void *GLhandleARB;
              ^
1 error generated.
Storing dependency cache.
Elapsed Time: 17 min 59 sec
The following command returned a non-zero value: g++ -ftemplate-depth-30 -fPIC -c -o built/tmp/p3glgsg_config_glgsg.o -Ibuilt/tmp -Ibuilt/include -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -DMAKEPANDA= -Ipanda/src/glgsg -Ipanda/src/glstuff -Wno-deprecated-declarations -arch x86_64 -pthread -msse2 -O2 -DBUILDING_PANDAGL panda/src/glgsg/config_glgsg.cxx
Build terminated.

I am not sure to use the right python version… I have only one version of python 2.7 by default (2.7.6).

I also tried to reinstall the dmg (1.9.0) you built with python2.7, 64 bits. But still have the same seg fault when running my code…

Hi rdb,

I am sorry to be here again !
I installed numpy into the system Python 2.7 installation, removing the macports ones before.
Panda3D is working (i.e. the examples are working).
But still have a lot of troubles with my python code because it needs a lot of python libraries and opencv, etc…
and the installation of all these libraries is very long and complicated.
As example, I used to install opencv using macports, and now I have some errors when installing it manually.
I think I will drop panda3D on my mac. I have it working on ubuntu…

Thanks again for your help
Cheers

You can use easy_install or pip to install those third-party libraries easily.

Yes. I should install all the libraries I need using pip or easy_install. I have no time to do that now. I will see later, maybe next week… Thank you very much for your help.

Cheers

I am having a similar issue when trying to build Panda3D from source on mac os x 10.9. I need to do this in order to have a newer build than the .dmg you provided. Do you have any ideas what may be causing this build error. I checked out the latest version from the repository about 1 week ago. Thank you!

I tried to follow this blog post’s advice in order to have a 64 bit installation. jesshamrick.com/2013/09/26/i … 27-on-osx/

python2.7 makepanda/makepanda.py --everything --installer --no-ffmpeg --no-vrpn --no-rocket --no-opencv --no-gles --no-gles2 --no-egl
WARNING: Could not locate thirdparty package swscale, excluding from build
WARNING: Could not locate thirdparty package swresample, excluding from build
WARNING: Could not locate thirdparty package fftw, excluding from build
WARNING: Could not locate thirdparty package osmesa, excluding from build
WARNING: Could not locate thirdparty package vorbis, excluding from build
Generating dependencies...
[ 45%] Building C++ object built/tmp/p3glgsg_config_glgsg.o
In file included from panda/src/glgsg/glgsg.h:88,
                 from panda/src/glgsg/config_glgsg.cxx:16:
built/include/panda_glext.h:5504: error: conflicting declaration ‘typedef unsigned int GLhandleARB’
/System/Library/Frameworks/OpenGL.framework/Headers/gltypes.h:65: error: ‘GLhandleARB’ has a previous declaration as ‘typedef void* GLhandleARB’
Storing dependency cache.
Elapsed Time: 13 sec
The following command returned a non-zero value: g++ -ftemplate-depth-30 -fPIC -c -o built/tmp/p3glgsg_config_glgsg.o -Ibuilt/tmp -Ibuilt/include -I/usr/local/Cellar/python/2.7.7_1/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/usr/local/Cellar/eigen/3.2.1/include/eigen3 -Ipanda/src/glgsg -Ipanda/src/glstuff -Wno-deprecated-declarations -pthread -msse2 -O2 -DBUILDING_PANDAGL panda/src/glgsg/config_glgsg.cxx
Build terminated.

I advise you to grab the latest development source of Panda3D, I believe it has this issue fixed.