工具: PyInstaller: 5.1
平台:Windows7 X64
Python文件(比如ByyouPass加载器)
UPX:Release UPX 3.96 · upx/upx · GitHub
一、安装pyinstaller
pip install pyinstaller
UPX未安装正确会出现:
INFO: wrote C:\Users\Administrator\Desktop\Youcode_Python.spec
INFO: UPX is not available.
下载upx,我选择的是:upx-3.96-win64.zip,解压出来复制upx.exe到pyinstaller所在文件夹
C:\Users\Administrator\AppData\Local\Programs\Python\Python38\Scripts

二、打包Python代码
C:\Users\Administrator>pyinstaller -F -w 007.py
with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:

本文详细介绍了如何在Windows 7环境下安装PyInstaller,并解决UPX缺失导致的问题。通过实例演示了如何使用UPX压缩Python代码,以及打包过程中遇到的权限错误。最后,提供了打包成功后的产物路径和关键步骤。

2427

被折叠的 条评论
为什么被折叠?



