3

I am working with a fresh install of Ubuntu 18.04 and installed QGIS using https://qgis.org/debian. I get the following error when I launch QGIS:

Couldn't load PyQt.
Python support will be disabled.
Traceback (most recent call last):
  File "", line 1, in 
ImportError: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.10' not found (required by /usr/local/lib/python3.6/dist-packages/PyQt5/QtCore.so)
Python version:
3.6.5 (default, Apr  1 2018, 05:46:30) 
[GCC 7.3.0]

QGIS version:
3.0.3-Girona 'Girona', 8a899c8

Python path:
['/usr/share/qgis/python', '/home/ned/.local/share/QGIS/QGIS3/profiles/default/python', '/home/ned/.local/share/QGIS/QGIS3/profiles/default/python/plugins', '/usr/share/qgis/python/plugins', '/usr/lib/python36.zip', '/usr/lib/python3.6', '/usr/lib/python3.6/lib-dynload', '/usr/local/lib/python3.6/dist-packages', '/usr/lib/python3/dist-packages']

A similar error has been reported as a bug (https://issues.qgis.org/issues/19040) but I haven’t seen a workaround.

I tried to install 2.18 (ltr) but apt-get failed with:

qgis : Depends: python-qgis (= 1:2.18.20+28bionic) but 1:3.1.0+git20180529+ad1fef9+28bionic is to be installed

Any suggestions on how to get QGIS working on Ubuntu 18.04?

5

I was able to reproduce this error by installing PyQt5 using the Python package manager. If you remove the Python-managed PyQt5 and instead install the OS version, QGIS should launch. I have confirmed that an OS-managed PyQt5 is available on clean install of Ubuntu 18.04, and a/o June 1, 2018, both Ubuntu repositories and PyPI are providing PyQt 5.10.1.

Remove PyQt5 with:

sudo pip3 uninstall PyQt5

You can confirm that PyQt5 is available to the system Python with:

apt-cache policy python3-pyqt5
  • Didn't work for me (Linux Mint 18). After uninstalling using pip3 QGIS didn't launch at all. I reinstalled PyQt5 and started working again, but with the same error. – Rodrigo E. Principe Oct 29 '18 at 12:11
  • I have done that in Ubuntu 18.04 and I can run now QGIS without a problem. But I need Qt library for some script which I wrote in python and I am trying to run with Pycharm. What should I do? :/ With PyQt I can't use PyQgis, with PyQGIS I can't use PyQt. :/ – Neven Nov 1 '18 at 13:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.