PyInstaller cannot find QtCompat.loadUi
See original GitHub issueA regular print(QtCompat)
will give you this:
['QFileDialog', 'QHeaderView', '__doc__', '__loader__', '__name__', '__package__', '__spec__', '_cli', '_convert', 'getCppPointer', 'loadUi', 'load_ui', 'qInstallMessageHandler', 'setSectionResizeMode', 'translate', 'wrapInstance']
But if using PyInstaller to build/freeze an application out of your python script (such as an .exe), the same command results in the following (where loadUi
and load_ui
are missing):
['QFileDialog', 'QHeaderView', '__doc__', '__loader__', '__name__', '__package__', '__spec__', '_cli', '_convert', 'getCppPointer', 'qInstallMessageHandler', 'setSectionResizeMode', 'translate', 'wrapInstance']
This is with Qt.py version 1.1.0.
I haven’t found a workaround so far… 😢
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Pyinstaller standalone executable cannot find ui file defined in ...
I'm using pyinstaller to compile a standalone executable file. The python script uses an external ui file from QtDesigner. I don't get it...
Read more >How to include ui-Files? - Google Groups
Is there a way to let a PyInstaller onefile include ... And when calling the onefile in a way that makes it available...
Read more >Python Examples of sip.setapi - ProgramCreek.com
This page shows Python examples of sip.setapi.
Read more >Python getapi Examples
Python getapi - 30 examples found. ... File: qtcompat.py Project: amela/orange3 ... if you want to use PyInstaller, find this file: ...
Read more >vocab.txt - Hugging Face
... zip getattr ##ender ##ely control stats variables ##nown ##32 ##ential whether vis io ##info math ndarray ##pth ##uid missing report ##ugh cent...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Another workaround, using a PyInstaller hook. Add a hook
hook-Qt.py
with contents:This triggers the imports in
hiddenimports
onimport Qt
and makesQt.QtCompat.loadUi
available as expected.Oops! Classic copy/paste mistake. Sorry. I’ll switch those two lines around.