1

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.

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
Klode
  • 353
  • 3
  • 18
  • see https://stackoverflow.com/a/59797479/6622587 – eyllanesc Feb 15 '20 at 17:12
  • Thanks for supply @eyllanesc. However, I've tried to install pyqt5==5.14.0, but I get another error, `Invalid requirement: 'sip >=5.0.1 <6'`, but I still have sip installed, version 5.1.1... – Klode Feb 16 '20 at 08:12
  • For now, I've resolved using `sudo apt-get install qt5-default pyqt5-dev pyqt5-dev-tools`, but when I start an application I got this warning: `qt.qpa.xcb: QXcbConnection: XCB error: 148 (Unknown), sequence: 181, resource id: 0, major code: 140 (Unknown), minor code: 20` – Klode Feb 16 '20 at 08:22

0 Answers0