Pyinstaller hangs on hook-PyQt5.py

36 views
Skip to first unread message

Alan Finger

unread,
Oct 10, 2020, 8:29:22 AM10/10/20
to PyInstaller
Hi all,
First time poster.

I'm trying to run pyinstaller on a wxPython desktop program. Builds fine on Windows but, on linux, it hangs running hook-PyQt5.py

26 INFO: PyInstaller: 4.0
26 INFO: Python: 3.6.9
27 INFO: Platform: Linux-5.4.0-47-generic-x86_64-with-LinuxMint-19.3-tricia
28 INFO: UPX is not available.

Best I can tell it's hanging here:
datas = [x for x in
collect_system_data_files(pyqt5_library_info.location['PrefixPath'],
'PyQt5')
if os.path.basename(x[0]) == 'qt.conf']

pyqt5_library_info.location['PrefixPath'] returns 

'/usr'

which, of course is a very big tree.

Any suggestions how to fix?

Thanks,
Alan

bwoodsend

unread,
Oct 11, 2020, 2:20:35 PM10/11/20
to PyInstaller

There’s a bug in collect_system_data_files that causes it to collect the parent folder of the folder it’s supposed to collect, which in some cases means trying to include most of your operating system. And it looks like there is a second bug in the Qt hooks if '/usr' if being passed to collect_system_data_files which would again drag in huge parts of your filesystem, even without the help if the 1st bug.

The 1st bug is fixed in the development version of PyInstaller and was introduced between the 3.6 and 4.0 releases so you can either upgrade:

pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip

or downgrade:

pip install pyinstaller==3.6

The second bug I’ll need to look into. Chances are no-one’s noticed.

Alan Finger

unread,
Oct 12, 2020, 3:35:33 AM10/12/20
to PyInstaller
The upgrade worked. Thanks!
Alan

Reply all
Reply to author
Forward
0 new messages