Pyinstaller 缺少引导加载程序 [英] Pyinstaller missing bootloader
问题描述
我在 win10-64 上全新安装了 Python37-32所有要求似乎都得到满足,我的 hello world python 文件正在执行
I fresh installed Python37-32 on win10-64 All requirements seem to be satisfied and my hello world python file is executing
if __name__ == '__main__' :
print("hello world")
但是当我尝试使用 pyinstaller
However when I try to use pyinstaller
pyinstaller hello.py
它以错误结束
5764 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
5764 INFO: Bootloader c:\users\xxxxxxx\appdata\local\programs\python\python37-32\lib\site-packages\PyInstaller\bootloader\Windows-32bit\run_d.exe
5764 INFO: checking EXE
5764 INFO: Building EXE because EXE-00.toc is non existent
5779 INFO: Building EXE from EXE-00.toc
Fatal error: PyInstaller does not include a pre-compiled bootloader for your
platform. For more details and instructions how to build the bootloader see
<https://pyinstaller.readthedocs.io/en/stable/bootloader-building.html>
这是Windows上的基本安装,我不应该手动重新编译任何引导加载程序(我习惯于使用旧版python进行pyinstaller并且从未遇到过问题).我应该在哪里解决这个问题?
It is a basic installation on windows, I should not have to recompile any bootloader manually (I am used to pyinstaller with older python versions and never had problems). Where should I look to solve this issue ?
编辑
该错误出现在 python37-32 中,但不在 python37(64 位)中
The error shows up in python37-32 but not in python37 (64bits)
推荐答案
下载 pyinstaller 和从源代码安装,而不是使用 pip.
Download pyinstaller and install from source instead using pip.
python setup.py install
然后,如果您的系统是 64 位,则构建 64 位引导加载程序,尽管 python37-32 需要 32 位引导加载程序.在源 cd bootloader
中运行 python ./waf all --target-arch=32bit
如这里
Then if your system is 64bit, the 64bit bootloader is built altough the python37-32 needs 32 bit bootloader.
In the source cd bootloader
and run python ./waf all --target-arch=32bit
as explained here
然后将 run.exe
从 build 文件夹复制到 pyinstaller 32bit bootloader 文件夹.
Then copy run.exe
from build folder to pyinstaller 32bit bootloader folder.
一个问题已在 pyinstaller github 上打开.
An issue has been opened on pyinstaller github.
这篇关于Pyinstaller 缺少引导加载程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!