Pyinstaller can't find target architecture when building bootloader

216 views
Skip to first unread message

Oliver Yang

unread,
Nov 1, 2021, 9:30:35 AM11/1/21
to PyInstaller
Let me explain what I did first. As most people do, I first used pip to install pyinstaller.
pip3 install pyinstaller
Everything seemed fine. It exited with "finished successfully" message. I then tested it with a simply python code. It went all the way to the end and then showed the following message.
it8GE.jpg
Having no clue at all, I decided to uninstall pyinstaller and download the source to build on the machine. After building bootloader, it exited with "finished successfully" as well but with another warning message.
scF4c.jpg

I ignored it and continued to install pyinstaller. It also ended with successful message. When I tested it, the same "not include a pre-compiled bootloader" error showed.

Here is what I get from /proc/cpuinfo. It's NanoPi Neo with 4 cores.
5cCfJ.jpg
I'm using the latest image from FriendlyARM, which was released on June this year.
AeWii.jpg
BTW, here is what I get from python3.
platform.machine() ==> armv7l
platform.system() ==> Linux

bwoodsend

unread,
Nov 2, 2021, 4:00:28 AM11/2/21
to PyInstaller

You’re on arm7l which pip and PyPI don’t support so that’s why PyInstaller can’t ship precompiled bootloaders for you. Most Pi users can install packages from pywheels
which contains a specially compiled copy of most common packages (see their home page for setting it up) but first, what is the output of ldd --version on your Pi? If it says glibc then go ahead and use piwheels. If it’s musl then this is going to be harder…

Oliver Yang

unread,
Nov 2, 2021, 1:14:01 PM11/2/21
to PyInstaller
Thanks a lot.
I went to pywheels to download the latest pyinstaller wheel and then installed manually. A successful installation again.
When I tried to test it with a very simple code, I didn't see bootloader error but see a file not found error instead.
Image 12.jpg

According to pywheel, pyinstaller supports Python 3.7 and 3.9. The OS got from FriendlyARM (NanoPi Neo) comes with Python 3.8. I don't know if this makes any difference.

bwoodsend

unread,
Nov 5, 2021, 5:28:34 AM11/5/21
to PyInstaller
That one is a bug in PyInstaller 4.6. It's fixed in 4.6.1 but we haven't released it yet. If you install 4.5 instead then you should be fine.

Oliver Yang

unread,
Nov 8, 2021, 5:29:44 AM11/8/21
to PyInstaller
I switched to 4.5.1. It works! Thanks a lot!
Reply all
Reply to author
Forward
0 new messages