带有“Hello World”的导入错误来自 Panda3d 的示例

发布于 2024-12-01 00:51:13 字数 1054 浏览 1 评论 0原文

我刚刚在我的 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

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

I just finished installing Panda3d on my Mac, a 3d Python game engine, but when I try to run the hello world example with

ppython helloworld.py

I get an issue:

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

Im assuming that my installation of the engine went wrong, and I am missing the some part of the engine, but I am not really sure how to deal with this issue. I would really appreciate any help. Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

只想待在家 2024-12-08 00:51:13

根据 Panda3D 入门 页面的“故障排除”部分,您可能需要安装 Nvidia Cg 工具包。

Per the "Troubleshooting" section of the Panda3D Getting-Started page, you probably need to install the Nvidia Cg toolkit.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文