导入错误:DLL加载失败:未找到指定模块

1 投票
1 回答
887 浏览
提问于 2025-04-18 10:51

我用py2exe创建了一个Python应用程序。当我在我的开发环境中运行这个exe文件时,一切正常。但是当我在一台干净的机器上运行它时,却出现了一个错误,

                   Traceback (most recent call last):
                   File "wx\_misc.pyc", line 1358, in Notify
                   File "wx\_core.pyc", line 14771, in Notify
                   File "invesalius.py", line 174, in Startup
                   File "gui\frame.pyc", line 30, in <module>
                   File "constants.pyc", line 25, in <module>
                   File "project.pyc", line 31, in <module>
                   File "vtk\__init__.pyc", line 43, in <module>
                   File "vtkIOPython.pyc", line 12, in <module>
                   File "vtkIOPython.pyc", line 10, in __load
                   ImportError: DLL load failed: The specified module could not be                   
                                found.
                    Traceback (most recent call last):
                    File "wx\_misc.pyc", line 1358, in Notify
                    File "wx\_core.pyc", line 14771, in Notify
                    File "invesalius.py", line 82, in Startup2
                    AttributeError: 'SplashScreen' object has no attribute 'control'
                    Traceback (most recent call last):
                    File "invesalius.py", line 197, in OnClose
                    AttributeError: 'SplashScreen' object has no attribute 'fc'

我使用的环境是: 1. Windows 8.1 RTM(64位) 2. Python(2.7 amd64) 3. py2exe(0.6.10a1)

任何建议都非常感谢...

1 个回答

0

听起来你需要在目标机器上安装一个Python运行环境。错误信息有没有提供更多关于缺失的DLL文件的信息?如果没有更多的信息,你可以试试一个叫做Dependency Walker的程序(depends.exe),它可能帮你找到缺少的DLL文件。

撰写回答