4

The following error shows when I am trying to open QGIS 3.0. Although I have installed PyQt5 and the module can be imported from python.

enter image description here

I am using Ubuntu 16.04 LTS

2
  • No info yet, but I'm experiencing the same problem. As the bug referred to by Asad Abbas is for a previous version, and was closed with no resolution, I've created a new bug report for QGIS 3.0.3 issues.qgis.org/issues/19040. Also, you don't mention your OS, but from the screenshot it looks like you are on Ubuntu. Please add this info to your question. Note that I am not having this problem on Windows (using OSGeo4W installer). May 27, 2018 at 20:28
  • Thank you for reminding me to update information about OS and yes you are absolutely right, I tried too on Win. with QGIS installer and didn't face any issue. May 28, 2018 at 5:01

2 Answers 2

3

Perhaps it is due to some bug in QGIS 3.0 as it was the case with QGIS 2.18 see https://issues.qgis.org/issues/16743 one thing you can do to solve this issue is to install latest version QGIS 3.0.2 from https://qgis.org/en/site/forusers/download.html and hope that it was taken care of or you can report it as bug.

2

QGIS is supposed to work with the OS-supplied PyQt5. In this case I was able to reproduce your error by installing PyQt5 from PyPI. I was able to confirm the same problem in the Ubuntu 18.04 LTS.

Try removing the PyPI-supplied PyQt5 and seeing if QGIS 3 launches:

sudo pip3 uninstall PyQt5

Note: You may still be unable to run QGIS 3. I have tried this on two different systems, and PyQt5 cannot be imported by Python3 for one of the systems. They are not exactly the same, but both of them are distros based on Ubuntu 16.04. Both of them have the exact same versions of Python3, PyQt5, and SIP, from the exact same repository. I'm not sure why it works on one and not on the other, but this is a Python problem, not a QGIS problem. The suggested solution seems to be to compile PyQt yourself.

References:

Possibly related:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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