pyinstaller打包exe报错: PermissionError: [Errno 13] Permission denied:

报错1:

PermissionError: [Errno 13] Permission denied: ‘C:\Users\pc\AppData\Roaming\pyinstaller\bincache00_py37_64bit\api-ms-win-core-util-l1-1-0.dll’

解决办法:

关掉360安全卫士。

报错2:

Several hooks defined for module ‘win32ctypes.core’. Please take care they do not conflict.

解决办法:

pip install pywin32-ctypes
在这里插入图片描述

报错3:

UPX is not available.
要先解决这个问题,否则打包不会成功,而且后面会报各种各样的错误。
UPX:the Ultimate Packer for eXecutables

解决办法:

https://blog.csdn.net/chentianveiko/article/details/107083912

报错4:

FileNotFoundError: [Errno 2] No such file or directory: ‘./data/chineseStopWords
.txt’
[11520] Failed to execute script main
在这里插入图片描述

解决办法:

使用绝对路径,双反斜杠

报错5:

Import to be excluded not found: ‘setuptools.py33compat’
在这里插入图片描述

解决办法:

PyInstaller对环境要求比较高,如果在本机上没装好C++库,经常没有报错——缺这个DLL,缺那个DLL……

所以这里建议大家,如果要在本地的Windows系统上打包,最好不要偷懒,也不要心疼存储空间和那点时间,老老实实把Visual Studio 2019装起来吧——社区版就行了,它会自动把各种DLL依赖都准备好,通常在开发过程中就很少遇到类似报错了。
Visual Studio 2019下载地址:https://visualstudio.microsoft.com/zh-hans/downloads/

  • 5
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

我是小飞熊

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值