I'm trying to install Qt5 for Python on ARM Linux (Debian Buster 10). The version of Python is 3.7.3. I've installed Qt5 using apt with command:
sudo apt-get install qt5-default pyqt5-dev pyqt5-dev-tools
When try to entering on Python3, if I using declaration:
from PyQt5.QtWidgets import QApplication, QLabel
the import works fine (I don't get any error).
But when I continue with:
app = QApplication([])
I got the error:
qt.qpa.xcb: QXcbConnection: XCB error: 148 (Unknown), sequence: 181, resource id: 0, major code: 140 (Unknown), minor code: 20
If I try to install PyQt5 from pip, I got this
sudo pip3 install pyqt5
Collecting pyqt5
Using cached https://files.pythonhosted.org/packages/3a/fb/eb51731f2dc7c22d8e1a63ba88fb702727b324c6352183a32f27f73b8116/PyQt5-5.14.1.tar.gz
Installing build dependencies ... done
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.7/tokenize.py", line 447, in open
buffer = _builtin_open(filename, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-install-_70atgk5/pyqt5/setup.py'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-_70atgk5/pyqt5/
Sorry, but I cannot understand where the problem is. Thanks.