使用pyinstaller打包时出现错误:

Fatal error: PyInstaller does not include a pre-compiled bootloader for your platform.

研究了一下资料,解决了该问题。

(1)安装 Visual Studio Build Tools

  1. 下载并安装 Visual Studio Build Tools

  2. 安装时选择 "C++ 生成工具"

image.png


image.png

(2)手动编译引导加载程序


# 克隆 PyInstaller 源码 

git clone https://github.com/pyinstaller/pyinstaller

如果github连接不上,可以直接下载代码包。

下载链接:https://daxiangtech.lanzouu.com/i8wyJ38gdlob

解压后将pyinstaller-develop文件夹下的所有文件,拷贝到

C:\Users\admin\AppData\Roaming\Python\Python38\site-packages\PyInstaller文件夹下(该地址是我的地址,需要存放到自己pyinstaller的地址下)

cd pyinstaller/bootloader

# 构建引导加载程序 

python ./waf distclean all

# 重新安装 PyInstaller 

cd ..
pip install .

重新执行打包命令,成功打包。



分类: 其他分享 标签: 暂无标签

评论

暂无评论数据

暂无评论数据

目录