Pyinstaller Packaging Issues
Documenting some cross-platform issues I encountered while packaging client applications with Pyinstaller.
Windows 7 Compatibility Issues
|
|
Starting from Python 3.9, Windows 7 is no longer supported. If the software needs to run on Windows 7, the highest Python environment is 3.8.
Missing Dynamic Runtime Libraries in Win 7
|
|
Fix what’s missing - put the DLL file in the program’s root directory folder, or in C:/windows/System32
. Generally, this problem does not occur in isolation but because Pyinstaller did not include some dynamically loaded libraries during packaging.
Missing Parts of Dynamic Loading in QT
|
|
Solution one: Put the Sitepackages/QtGui
from your environment into the program’s root folder.
Solution Two: Use the packaging command pyinstaller main.py --noconsole --hidden-import PySide6.QtXml -F -p C:\Windows\System32\downlevel -p C:\Windows\System32
to manually load the missing modules by specifying hidden-import
.
pyinstaller could not get source code
Search backward in the error log, manually copy the missing environment packages to the program’s root directory, or specify these missing packages using hidden-import
during packaging.