在 Python 2.6 上运行 Panda3D

发布于 2024-08-02 23:05:19 字数 1255 浏览 9 评论 0原文

我刚刚第一次获得 Panda3D。我删除了包含的Python版本。在我的 Python 目录中,我放置了一个如下所示的文件 panda.pth

C:\Panda3D-1.6.2
C:\Panda3D-1.6.2\bin

但是当我运行 import direct.directbase.DirectStart 时,我得到:

Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    import direct.directbase.DirectStart
  File "C:\Panda3D-1.6.2\direct\directbase\DirectStart.py", line 3, in <module>
    from direct.showbase import ShowBase
  File "C:\Panda3D-1.6.2\direct\showbase\ShowBase.py", line 10, in <module>
    from pandac.PandaModules import *
  File "C:\Panda3D-1.6.2\pandac\PandaModules.py", line 1, in <module>
    from libpandaexpressModules import *
  File "C:\Panda3D-1.6.2\pandac\libpandaexpressModules.py", line 1, in <module>
    from extension_native_helpers import *
  File "C:\Panda3D-1.6.2\pandac\extension_native_helpers.py", line 75, in <module>
    Dtool_PreloadDLL("libpandaexpress")
  File "C:\Panda3D-1.6.2\pandac\extension_native_helpers.py", line 73, in Dtool_PreloadDLL
    imp.load_dynamic(module, pathname)
ImportError: Module use of python25.dll conflicts with this version of Python.

我假设这个与我使用Python 2.6有关。有什么解决办法吗?

I just got Panda3D for the first time. I deleted the included Python version. In my Python dir, I put a file panda.pth that looks like this:

C:\Panda3D-1.6.2
C:\Panda3D-1.6.2\bin

But when I run import direct.directbase.DirectStart, I get:

Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    import direct.directbase.DirectStart
  File "C:\Panda3D-1.6.2\direct\directbase\DirectStart.py", line 3, in <module>
    from direct.showbase import ShowBase
  File "C:\Panda3D-1.6.2\direct\showbase\ShowBase.py", line 10, in <module>
    from pandac.PandaModules import *
  File "C:\Panda3D-1.6.2\pandac\PandaModules.py", line 1, in <module>
    from libpandaexpressModules import *
  File "C:\Panda3D-1.6.2\pandac\libpandaexpressModules.py", line 1, in <module>
    from extension_native_helpers import *
  File "C:\Panda3D-1.6.2\pandac\extension_native_helpers.py", line 75, in <module>
    Dtool_PreloadDLL("libpandaexpress")
  File "C:\Panda3D-1.6.2\pandac\extension_native_helpers.py", line 73, in Dtool_PreloadDLL
    imp.load_dynamic(module, pathname)
ImportError: Module use of python25.dll conflicts with this version of Python.

I'm assuming this has something to do with me using Python 2.6. Any solutions?

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

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

发布评论

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

评论(2

你怎么这么可爱啊 2024-08-09 23:05:19

Python 扩展在主要版本之间不具有二进制兼容性。您的选择是:

A. 重新编译 panda3d for python 2.6。

B.使用python 2.5。

没有办法解决它。

Python extensions aren't binary compatible across major releases. Your options are:

A. Recompile panda3d for python 2.6.

B. Use python 2.5.

No way around it.

护你周全 2024-08-09 23:05:19

如果您可以等待即将发布的 1.7.0 版本,它将针对 Python 2.6 进行编译 - 请参阅 此帖子

If you can wait for the upcoming 1.7.0 release, it will be compiled against Python 2.6 - see this thread.

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