ImportError:运行.exe文件py2exe时没有名为os的模块

问题描述 投票:0回答:1

我已经创建了python文件的.exe。当我运行.exe文件时,出现以下错误消息:

追踪(最近通话):

文件“ C:--- \ Anaconda2 \ lib \ site-packages \ py2exe \ boot_common.py”,行92,在

导入行缓存

ImportError:没有名为linecache的模块

追踪(最近通话):

文件“ mypythonfile.py”,第8行,在

ImportError:没有名为os'的模块

python python-2.7 exe py2exe
1个回答
0
投票
删除. exe文件并运行(x是程序包)

pip install x pip install module

然后再次使用pyinstaller创建可执行文件。它对我有用。
© www.soinside.com 2019 - 2024. All rights reserved.