如何修复这个DLL加载的Python错误?
我在我的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系统上运行。我还在另一台Windows 7电脑上测试过(都是32位的)。