在 Python 2.6 上运行 Panda3D
我刚刚第一次获得 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
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.
如果您可以等待即将发布的 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.