1

I work on UBUNTU 18.04 LTS/bionic, I am trying to compile QGIS 3.6.0, for an upgrade from QGIS 3.2. 0. I am facing the same trouble as several people the release compatibility between SIP and PyQT5 an more maybe.

For QGIS 3.2.0 compilation I worked with SIP 4.19.7 and PyQt5 5.11.3, I succeed the compilation.

For QGIS 3.6.0 I try PyQt5 5.12 and SIP 5.19.15 (GPL release). I download source tarball from RIVERBANK repository. I compile each of them, PyQt5 5.12 and SIP 5.19.15, with configure.py and PyThon 3.6.7. Everything seems OK installation are done. I remove any garbage (I think) about other SIP installation. I installed also QSCIintilla, release 2.11.1. The Qt release is 5.9.5

When, for QGIS 3.6.0, I prepare the Makefile with CMake, I have the following messages :

Traceback (most recent call last):
  File "/home/mbariou/WKSCOMPILE/QGIS/QGIS-final-3_6_0/cmake/FindPyQt5.py", line 34, in <module>
    import PyQt5.pyqtconfig
ModuleNotFoundError: No module named 'PyQt5.pyqtconfig'

In fact I have not a such module but I have:

/usr/local/py356/lib/python3.5/site-packages/pyqtconfig/config.py

More, also this error message from CMake :

Found SIP version: 4.19.15
Traceback (most recent call last):
File "/home/mbariou/WKSCOMPILE/QGIS/QGIS-final-3_6_0/cmake/FindQsci.py", line 45, in <module>
from PyQt5.Qsci import QSCINTILLA_VERSION_STR
RuntimeError: the sip module implements API v12.0 to v12.5 but the PyQt5.QtCore module requires API v12.6 

Qsci sip file not found - disabling bindings for derived classes

I met the same difficulty when I compiled QGIS 3.2.0 the conflict was the same with other release, bit I succeeded in a random way it seems, in fact I downgrade to the Ubuntu 18.04/bionic distribution about PyQt5 and SIP.

But the following message is recurrent :

RuntimeError: the sip module implements API v12.0 to v12.5 but the PyQt5.QtCore module requires API v12.6

Can somebody deciphers this conflict and what are the release rules to respect between :

  • PyQt5,
  • sip,
  • Qt,
  • QGIS ?

1 Answer 1

1

Success it Works

Finally I find a way to start correctly QGIS 3.6.1, with console Python. But I must say I don't decipher correctly the release relationship between SIP, PyQt5, Qt, and QGIS. My conclusion is sip 4.19.7 works for me.

How I proceed ?

  1. First I remove any package (through apt-get (Unbuntu) or pip3 (Python) linked to sip, pyqt5, qscintilla
  2. second with apt I have done the following install from the Ubuntu 18.04 LTS

    sudo apt install sip-dev python3-sip pyqt5-dev pyqt5.qsci-dev python-sip-dev python3-sip pyqt5-dev-tools python3-pyqt5 python3-pyqt5.qtmultimedia python3-pyqt5.qtopengl python3-pyqt5.qtquick python3-pyqt5.qtsql python3-pyqt5.qtsvg python3-pyqt5.qtwebkit python3-sip python3-sip-dev libqscintilla2-qt5-dev libqgis-customwidgets libqgis-gui3.4.5 libqscintilla2-qt5-13 openscad python-pyqt5.qsci python-qgis python-qgis-common python3-pyqt5.qsci

An then, I prepared the Makefile with CMake for QGIS 3.6.1, it was correct I runned the compile followed by install it succeeded !

On command line : > sip -V => 4.19.7

And when I run the following python script :

import sys
from sip import SIP_VERSION_STR
import sip
import qgis
print("SIP version:", SIP_VERSION_STR)

The result was :

SIP version: 4.19.13 PyQt version: 5.10.1 QScintilla version: 2.10.2

Two different numbers release for sip curious ?

When I start QGIS 3.6.1 , it failed about Python console and extension loading => I have the following messages "I translate from french language" : can'load extension 'geomovetools' call error to classFactory() ValueError: PyCapsule_GetPointer called with incorrect name

After some turn around on stackexchange I found the suggestion that I will have to recompile sip 4.19.7 from code source => https://github.com/eduardosm/sip-4.19.7

With the following configuration command :

python3 configure.py --sip-module PyQt5.sip --no-tools

And make and sudo make install for this sip built

I did that as indicated!

Now Everything is OK ! and QGIS 3.6.1 starts perfectly on Ubuntu 18.04 LTS

Now On my side I have :

sip -V => 4.19.7 (from /usr/bin/sip)

And when I run the following script :

import sys
from PyQt5.QtCore import QT_VERSION_STR
from PyQt5.Qt import PYQT_VERSION_STR
from sip import SIP_VERSION_STR
import sip
import qgis
from PyQt5.Qsci import QSCINTILLA_VERSION_STR
print(sip.__file__)
print("Qt version:", QT_VERSION_STR)
print("SIP version:", SIP_VERSION_STR)
print("PyQt version:", PYQT_VERSION_STR)
print("QScintilla version:", QSCINTILLA_VERSION_STR)

The result is :

usr/lib/python3/dist-packages/sip.cpython-36m-x86_64-linux-gnu.so
Qt version: 5.9.5
SIP version: 4.19.7
PyQt version: 5.10.1
QScintilla version: 2.10.2

I hope this can help others, for me it was like an escape from a jail where I was trapped for one month. Enjoy!

Your Answer

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

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