问题
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")
However when I try to use pyinstaller
pyinstaller hello.py
It finishes with error
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>
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 ?
EDIT
The error shows up in python37-32 but not in python37 (64bits)
回答1:
First, ensure that you are running the latest version of Pyinstaller==3.5. The previous versions of pyinstaller do not support python3.7.
If that is okay, it could be because of an incomplete installation of pyinstaller Check manually if the bootloader files are present for your pyinstaller installation. The bootloader (pre-compiled) files should be in your python installation
c:\users\xxxxxxx\appdata\local\programs\python\python37-32\lib\site-packages\PyInstaller\bootloader\Windows-32bit\run_d.exe
As a last resort, I would suggest installing pyinstaller through setup.py. It should build the bootloader for your machine when you run setup.py https://pythonhosted.org/PyInstaller/installation.html#installing-from-the-archive
回答2:
Download pyinstaller and install from source instead using pip.
python setup.py install
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
Then copy run.exe from build folder to pyinstaller 32bit bootloader folder.
An issue has been opened on pyinstaller github.
来源:https://stackoverflow.com/questions/57077169/pyinstaller-missing-bootloader