【Python生成exe 报错 完美解决】

【Python生成exe 报错 完美解决】,第1张

【Python生成exe 报错 完美解决

FileNotFoundError: [Errno 2] No such file or directory: ‘C:UsersADMINI~1AppDataLocalTemp_MEI68682wordcloudstopwords’

首先以上是报错信息

最终解决是在生成exe的语句中加入 文件stopwords ,位置为exe目录的wordcloud下

具体语句:
Pyinstaller -F -w --add-data “stopwords;./wordcloud/” Test_To_LabVIEW.py

因此推测 _MEI68682 表示的是在临时变量文件夹下的应用路径,
因此遇到类似的提示报错信息 可以使用 --add-data “文件;相对应用路径” 修复

这里推荐一个调试利器 auto-py-to-exe(生成exe的GUI软件 使用pip安装)

如果不熟悉可以使用这个调试,这个报错就是靠它解决的.

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5689608.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-17
下一篇 2022-12-17

发表评论

登录后才能评论

评论列表(0条)

保存