py2exe ImportError

[亡魂溺海] 提交于 2019-12-10 18:56:44

问题


I read the py2exe tutorial and successfully convert my python code to a running exectuable.

But when i tried to run it on another computer that dont have python installed , i get the following error:

Traceback (most recent call last):
File "C:\Program_Files\Pyton2_7_2\lib\site-packages\py2exe\boot_common.py", line 92, in ImportError: No module named linecache
Traceback (most recent call last):
File "auto_create_workspace.py", line 1, in ImportError: No module named subprocess

On my computer , even if I uninstalled python , it still works.

UPDATE I tried to copy the dist folder to another drive on my computer and it still working. When I copy it to network drive and run from there , I get the same error as above.

What can be the problem?


回答1:


I still dont know what is the problem in py2exe, so I tried pyinstaller instead and its works



来源:https://stackoverflow.com/questions/9313152/py2exe-importerror

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!