我有这个Python脚本,我想在没有python的其他Windows计算机上运行。所以我尝试了py2exe和pyinstaller但这些都不起作用,因为当我尝试将.exe文件复制到另一个系统并运行它但我得到一个错误:
Traceback (most recent call last):
File "client.pyw", line 4, in <module>
File "zipextimporter.pyo", line 82, in load_module
File "gtk\__init__.pyo", line 30, in <module>
File "zipextimporter.pyo", line 82, in load_module
File "gobject\__init__.pyo", line 26, in <module>
File "zipextimporter.pyo", line 82, in load_module
File "glib\__init__.pyo", line 22, in <module>
File "zipextimporter.pyo", line 98, in load_module
ImportError: MemoryLoadLibrary failed loading glib\_glib.pyd
答案 0 :(得分:0)
您可以尝试cx_Freeze或将Python安装到程序安装程序(可能是批处理脚本):
msiexec /i /quiet /passive python.msi
答案 1 :(得分:0)
当需要从Python脚本中创建可执行文件时,我发现py2exe(或其GUI兄弟GUI2Exe是最有用的工具。有一些other options。< / p>