来自Panda3d的'Hello World'示例的ImporError

时间:2011-08-22 21:42:15

标签: python panda3d

我刚刚在Mac上安装了Panda3d,这是一款3D Python游戏引擎,但当我尝试用

运行hello world示例时
ppython helloworld.py

我遇到了一个问题:

Traceback (most recent call last):
  File "helloworld.py", line 1, in <module>
    from direct.showbase.ShoHewBase import ShowBase
  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>
    Dtool_PreloadDLL("libpanda")
  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

我假设我的引擎安装出错了,我错过了引擎的某些部分,但我不确定如何处理这个问题。我真的很感激任何帮助。感谢。

1 个答案:

答案 0 :(得分:3)

根据Panda3D Getting-Started页面的“疑难解答”部分,您可能需要安装Nvidia Cg工具包。