-
Notifications
You must be signed in to change notification settings - Fork 254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include Qt.py to application with Pyinstaller #338
Comments
https://gist.github.com/paulwinex/0fd7b25a9c646fba05e3ccc4c2ca6d51 |
Hm, that's funny. I used both Qt.py and PySide2 with fbs (fbs uses pyinstaller) and that worked fine. I did not use pyinstaller hooks but instead I just made a dummy module which performed a bunch of imports. For PySide2 I had to do the following; from PySide2 import QtXml from PySide2 import QtUiTools But I didn't have to do anything in particular to make Qt.py work. |
I using import from Qt only. Not "from PySide2...", only "from Qt import...". |
This isn't really a supported usecase for Qt.py since you no longer have a need to support more than the binding you bundle? The simple solution would be to bundle PySide2 and make Qt.py look like it. sys.modules["Qt"] = PySide2 Now whenever Qt.py is imported it would instead get PySide2. But again this is outside the scope of Qt.py. |
Actually my app no need to compile. It is temporary solution for solve specific problem.
And compiled version is works! |
I try to build application with Pyinstaller 3.6.
If i add Qt and PySIde2 to the hidden imports i catch error:
ModuleNotFoundError: No module named 'Qt'
When i exclude Qt for using external original module Qt.py i catch this error:
ModuleNotFoundError: No module named 'Qt.QtWidgets'; 'Qt' is not a package
Can you help me how i can correct include Qt.py to the build?
I use spec file
Python 3.7
Pyinstaller 3.6
Debian 10
The text was updated successfully, but these errors were encountered: