【发布时间】:2011-02-20 14:42:13
【问题描述】:
我在我的 python 代码中使用了一个 c++ dll。 当我在我的计算机上运行我的 python 应用程序时,它可以正常工作,但是当我将所有内容复制到另一台计算机时会发生这种情况:
Traceback (most recent call last):
File "C:\users\Public\SoundLog\Code\Código Python\SoundLog\SoundLog.py", line 9, in <module>
from Auxiliar import *
File "C:\users\Public\SoundLog\Code\Código Python\SoundLog\Auxiliar\DataCollection.py", line 4, in <module>
import SoundLogDLL
File "C:\users\Public\SoundLog\Code\Código Python\SoundLog\Auxiliar\SoundLogDLL.py", line 4, in <module>
dll = cdll.LoadLibrary(os.environ['PUBLIC'] + "\\SoundLog\\DLLs\\ForPython\\SoundLogC++WrapperDLL.dll")
File "C:\Python26\lib\ctypes\__init__.py", line 431, in LoadLibrary
return self._dlltype(name)
File "C:\Python26\lib\ctypes\__init__.py", line 353, in __init__
self._handle = _dlopen(self._name, mode)
WindowsError: [Error 14001] The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail
如何解决这个问题,以便我的 python 应用程序在每台计算机上都可以运行?
注意: 我只需要他们像我一样在 Windows 7 上工作。我在另一台win7电脑上测试(都是32位)。
【问题讨论】:
标签: python