【排错】Fatal error: PyInstaller does not include a pre-compiled bootloader for your platform.
使用pyinstaller打包时出现错误:
Fatal error: PyInstaller does not include a pre-compiled bootloader for your platform.
研究了一下资料,解决了该问题。
(1)安装 Visual Studio Build Tools
安装时选择 "C++ 生成工具"
(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 .
重新执行打包命令,成功打包。
版权申明
文章由大象博客原创,转载引用需注明出处:大象博客(https://daxiang.tech)
暂无评论数据