我使用py2exe将我的脚本转换为.exe文件。它工作正常,但当我将包含exe文件和所有相关文件的 dist 文件夹复制到另一台PC时。它运行失败。错误是:
Traceback (most recent call last):
File "Agent.py", line 6, in <module>
File "psutil\__init__.pyc", line 146, in <module>
File "psutil\_pswindows.pyc", line 16, in <module>
File "psutil\_psutil_windows.pyc", line 12, in <module>
File "psutil\_psutil_windows.pyc", line 10, in __load
ImportError: DLL load failed: The specified module could not be found.
但是当我签入文件夹 dist / libary / psutil 时,那些模块就在那里。 它不会错过为什么错误告诉我那些模块无法找到?