Won't run sample programs

I have installed from the 1.8.1 installer onto my mac and get the following when trying to run any of the example programs given.

Traceback (most recent call last):
  File "Tut-Chessboard.py", line 10, in <module>
    import direct.directbase.DirectStart
  File "dstroot/pythoncode/Developer/Panda3D/lib/direct/directbase/DirectStart.py", line 3, in <module>
  File "dstroot/pythoncode/Developer/Panda3D/lib/direct/showbase/ShowBase.py", line 10, in <module>
  File "/Developer/Panda3D/lib/pandac/PandaModules.py", line 8, in <module>
    from libpandaModules import *
  File "/Developer/Panda3D/lib/pandac/libpandaModules.py", line 2, in <module>
  File "/Developer/Panda3D/lib/pandac/extension_native_helpers.py", line 79, in Dtool_PreloadDLL
    imp.load_dynamic(module, pathname)
ImportError: dlopen(/Developer/Panda3D/lib/libpanda.dylib, 2): Library not loaded: @executable_path/../Frameworks/Cg.framework/Cg
  Referenced from: /Developer/Panda3D/lib/libpanda.dylib
  Reason: image not found

I have a Mac OS X Lion 10.7.5 and also have Python 2.7.1 installed and use it fairly regularly. I am not even sure where to start to address this issue. I did check the libpanda.dylib, which it appears is an alias for the 1.8 version of libpanda, and both are where they should be. I have also tried 3-4 different example programs provided and get the same error.

Can someone give me an idea of where to start to address this?

You will also need to install the NVidia Cg Toolkit.


I see. Thank you.

Out of curiosity, is there a reason this is not mentioned obviously somewhere? The download page gave the implication it was the only thing needed.

Yes, I agree this should be mentioned on the download page. Actually, it would be even better if the download included Cg somehow itself, though I’m not sure if that’s possible.


Says it right here on the download page:
panda3d.org/download.php?pl … =1.8.1&sdk

It also says it on the page that appears when you exit the installer:
panda3d.org/manual/index.ph … ted_on_OSX

NVIDIA recently relaxed their redistribution rules, so perhaps we could start shipping it along now. Hmm, I’ll think about it.