解决pyinstaller打包py文件时upx报NotCompressibleException的问题

想把毕设用pyqt5做的界面打包 结果报了如下错误:
`853 INFO: PyInstaller: 5.0
853 INFO: Python: 3.9.7 (conda)
910 INFO: Platform: Windows-10-10.0.22000-SP0
911 INFO: wrote C:\Users\83480\PycharmProjects\pyqt5_car\ui_yoloV5.spec
984 INFO: UPX is available.
988 INFO: Extending PYTHONPATH with paths
[‘C:\Users\83480\PycharmProjects\pyqt5_car’]
2195 INFO: checking Analysis
3748 INFO: checking PYZ
4154 INFO: checking PKG
4155 INFO: Building PKG because PKG-00.toc is non existent
4155 INFO: Building PKG (CArchive) ui_yoloV5.pkg
4168 INFO: Executing - upx–lzma-qC:\Users\83480\AppData\Local\pyinstaller\bincache01_py39_64bit\api-ms-win-crt-math-l1-1-0.dll
The subprocess:
upx–lzma-qC:\Users\83480\AppData\Local\pyinstaller\bincache01_py39_64bit\api-ms-win-crt-math-l1-1-0.dll
exited with error 1 and error output:
Copyright © 1996 - 2020
UPX 3.96w Markus Oberhumer, Laszlo Molnar & John Reiser Jan 23rd 2020
File size Ratio Format Name
-------------------- ------ ----------- -----------
upx: C:\Users\83480\AppData\Local\pyinstaller\bincache01_py39_64bit\api-ms-win-crt-math-l1-1-0.dll: NotCompressibleException

Packed 1 file: 0 ok, 1 error.

`
原因的话 我墙内墙外搜了一圈 全是说linux的 没找到什么原因 但是在github上找到了相似问题和解决方案 自己试了一下 成功了 分享出来。

https://github.com/pyinstaller/pyinstaller/pull/6758/commits/d8203994f0a4b06f9ebe83467b84957d96211fc7

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值