py2exe导入错误
我阅读了 py2exe 教程并成功将我的 python 代码转换为正在运行的可执行文件。
但是当我尝试在另一台没有安装 python 的计算机上运行它时,出现以下错误:
回溯(最近一次调用最后一次):
文件“C:\Program_Files\Pyton2_7_2\lib\site-packages\py2exe\boot_common.py”,第 92 行,位于 导入错误:没有名为 linecache 的模块
回溯(最近一次调用最后一次):
文件“auto_create_workspace.py”,第 1 行,位于 导入错误:没有名为 subprocess 的模块
在我的电脑上,即使我卸载了 python,它仍然可以工作。
更新 我尝试将 dist
文件夹复制到计算机上的另一个驱动器,但它仍然有效。 当我将其复制到网络驱动器并从那里运行时,我收到与上面相同的错误。
可能是什么问题?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我仍然不知道 py2exe 中的问题是什么,所以我尝试了 pyinstaller ,它的工作原理
I still dont know what is the problem in py2exe, so I tried pyinstaller instead and its works