Skip to content
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

Can't run under Ubuntu 22.04 #102

Open
dwarning opened this issue Aug 22, 2022 · 3 comments
Open

Can't run under Ubuntu 22.04 #102

dwarning opened this issue Aug 22, 2022 · 3 comments

Comments

@dwarning
Copy link

I tried to install the program under the new Ubuntu release 22.04. I have Qt4 and Qt5 installed.
But got runtime error:
Traceback (most recent call last):
File "/home/dietmar/.local/bin/qspectrumanalyzer", line 5, in
from qspectrumanalyzer.main import main
File "/home/dietmar/.local/lib/python3.10/site-packages/qspectrumanalyzer/main.py", line 5, in
from Qt import QtCore, QtGui, QtWidgets, binding
File "/usr/local/lib/python3.10/dist-packages/Qt.py", line 1925, in
_install()
File "/usr/local/lib/python3.10/dist-packages/Qt.py", line 1903, in _install
our_submodule = getattr(Qt, name)
AttributeError: partially initialized module 'Qt' has no attribute 'QtGui' (most likely due to a circular import)
Under 20.04 everything was well.

@courtarro
Copy link

I'm not the developer, but this looks like a conflict between PyQt and Qt.py, which are two different packages. You have Qt.py installed outside the package manager and it's taking precedence over PyQt. Either remove Qt.py, move it to a virtualenv, or run qspectrumanalyzer inside its own virtualenv.

@dwarning
Copy link
Author

dwarning commented Dec 5, 2022

Thanks for response.
I removed Qt.py but then the import can't work:

from Qt import QtCore, QtGui, QtWidgets, __binding__
ModuleNotFoundError: No module named 'Qt'

I have python3-pyqt5 installed. It is a nightmare with the qt installation.

@courtarro
Copy link

Actually I was mistaken. Qt.py is indeed used by this project, so you need it installed after all. Reinstall it but try using pip install --user Qt.py and see if that works better.

Run python3 -c "import sys; print('\n'.join(sys.path))" to see what library paths are being searched by your Python instance.

Check /usr/local/lib/python3.10/dist-packages/ for any lingering references to Qt that shouldn't be there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants