社区
脚本语言
帖子详情
新人求助,python打包为exe文件后报错 No such file or directory
onelittlestar
2020-07-01 05:00:33
python代码运行是正常的,打包成exe后运行就闪退。
我快速截了图,发现是No such file or directory,但我已经定义过了,所以想求助这是怎么回事?
不胜感激~
...全文
616
1
打赏
收藏
新人求助,python打包为exe文件后报错 No such file or directory
python代码运行是正常的,打包成exe后运行就闪退。 我快速截了图,发现是No such file or directory,但我已经定义过了,所以想求助这是怎么回事? 不胜感激~
复制链接
扫一扫
分享
举报
写回复
配置赞助广告
1 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
afleshfish
2020-07-01
打赏
举报
回复
就是你打包的这个项目中,使用了这个路径的文件,你看一下你是否需要这个_MEtopwords,如果不需要,你把项目中使用的这一句注释了就可以了。具体看你项目需不需要这个东西吧,如果需要,就把_MEtopwords放到这个“C:\Users\炘珏\AppData\Local\Temp”目录下就好了。
相关推荐
将
Python
脚本
打包
exe
程序
目录 1.安装 PyInstaller库 2.
打包
3.
打包
包含selenium库 的脚本时遇到的问题 3.1
打包
完成运行
exe
文件
报
错
3.1.1
No
such
file
or
directory
: '\\selenium\webdriver\remote\getAttribute.js' 3.1.2
No
such
file
or
directory
: '
exe
文件
目录\getAttribute.js' 3.1.3 Module ‘puwintypes’ isn’t in froze.
python
:pyinstaller
打包
后,运行
exe
提示缺失包
文件
场景 使用
python
写的一个ui工具,用于连接并操作impala。但在
打包
后,
报
错
提示:
File
No
tFoundError: [Err
no
2]
No
such
file
or
directory
: 'D:\\code\\
python
\\excel2csv\\dist\\UI\\impala\\thrift\\
Exe
cStats.thrift'
打包
命令: pyinstaller -D -p D:\code\
python
\excel2csv\venv\Lib\site-packages U
Python
使用Pyinstaller将游戏
打包
为
exe
可执行
文件
时
报
错
No
such
file
or
directory
:‘*_MEI124002\\pgzero\\data\\icon.png‘
目前
打包
成
exe
可执行
文件
的方法网上有很多,不再详细说明,大概说下本人
打包
的过程以及遇到的问题 第一步:安装pyinstaller: pip install pyinstaller 我是直接使用pycharm安装的: 第二步: 安装完pyinstaller后开始
打包
文件
: 切换到
文件
所在的目录,然后执行:pyinstaller -F 10-1.py
打包
完成后会在当前
文件
下面生成以下几个
文件
以及
文件
夹: 生成的
exe
文件
在dist
文件
夹下: 第三步:双击
exe
文件
,运行程序。
Pyinstaller :
Python
打包
exe
时,PyQt5
打包
成
exe
时,引用了ui
文件
报
错
代码中使用了相对路径:MyUi/gethttp.ui 会
报
错
No
such
file
or
directory
:'MyUi/gethttp.ui', 经过测试得知,
打包
exe
时需要转换为相对路径, def __init__(self): super(CalMain, self).__init__() # Call the inherited classes __init__ ...
pyinstaller
打包
exe
文件
,运行时
报
错
:
File
No
tFoundError: [Err
no
2]
No
such
file
or
directory
xxx.txt
使用pyinstaller
打包
了.py
文件
,执行生成.
exe
报
错
,如下图所示: 原因:.py
文件
使用了相对路径,然而生成的.
exe
在dist目录下,因此执行出
错
。 办法:把相对路径改成绝对路径,重新
打包
。OK!
发帖
脚本语言
脚本语言
JavaScript,VBScript,AngleScript,ActionScript,Shell,Perl,Ruby,Lua,Tcl,Scala,MaxScript 等脚本语言交流。
复制链接
扫一扫
3.7w+
社区成员
3.4w+
社区内容
JavaScript,VBScript,AngleScript,ActionScript,Shell,Perl,Ruby,Lua,Tcl,Scala,MaxScript 等脚本语言交流。
社区管理员
加入社区
获取链接或二维码
帖子事件
创建了帖子
2020-07-01 05:00