0

Couldn't find a similar question for Linux, just Windows.

I'm running Linux Mint 19.3.

Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3/dist-packages/qgis/__init__.py", line 70, in 
    from qgis.PyQt import QtCore
  File "/usr/lib/python3/dist-packages/qgis/PyQt/QtCore.py", line 24, in 
    from PyQt5.QtCore import *
ImportError: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.14' not found (required by /home/jrickards/.local/lib/python3.6/site-packages/PyQt5/QtCore.abi3.so)


Python version:
3.6.9 (default, Apr 18 2020, 01:56:04) 
[GCC 8.4.0]

QGIS version:
3.10.5-A Coruña 'A Coruña', exported

Python path:
['/usr/share/qgis/python', '/home/jrickards/.local/share/QGIS/QGIS3/profiles/default/python', '/home/jrickards/.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', '/home/jrickards/.local/lib/python3.6/site-packages', '/usr/local/lib/python3.6/dist-packages', '/usr/lib/python3/dist-packages', '/usr/lib/python3.6/dist-packages']

How do I resolve this?

3 Answers 3

3

Found the answer here:

https://askubuntu.com/questions/1144003/ubuntu-18-04-couldnt-load-sip-module-qgis

Just remove PyQt5 using pip3:

pip3 uninstall PyQt5

And install form apt:

sudo apt-get install python3-pyqt5

Works just fine.

1
1

Is pyqt5 installed ? You can write this in a terminal to do so :

sudo apt install python3-pyqt5 pyqt5-dev-tools qttools5-dev-tools
1
  • ran this, no difference
    – jrickards
    May 20, 2020 at 18:52
0

If the other answer's suggestion to remove the module installed with pip does not work, telling you that the module doesn't exist:

pip3 uninstall PyQt5
WARNING: Skipping PyQt5 as it is not installed.

... It might be that the module was installed for a different version of Python to the default one for the user. This might happen if pip was used with sudo (therefore installing a module for root's default version of python).

In that case, you might have to try to uninstall with sudo too:

sudo pip3 uninstall PyQt5

You can investigate the version mismatch with:

python3 --version
sudo python3 --version

...and check which one matches your error message.

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.