简体   繁体   中英

How to distribute my Python script to other computers without python?

I have this Python script which I want to run on other windows computers without python.So i have tried py2exe and pyinstaller but none of these work as when I try copy the .exe file to an other system and run it but I get an ERROR:

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

您可以尝试cx_Freeze或将Python安装包括在程序安装程序中(可能是批处理脚本):

msiexec /i /quiet /passive python.msi

当需要使用Python脚本制作可执行文件时,我发现py2exe (或其GUI兄弟GUI2Exe是最有用的工具。还有其他一些选择)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM