[PyQt] [opensuse] 12:3: Python chaos

Hans-Peter Jansen hpj at urpla.net
Thu Nov 28 15:14:47 GMT 2013


On Mittwoch, 27. November 2013 08:08:41 Roger Oberholtzer wrote:
> On Tuesday, November 26, 2013 02:38:10 PM Hans-Peter Jansen wrote:
> > > RuntimeError: the sip module implements API v10.0 to v10.1 but the
> > > qgis.core module requires API v9.2
> > 
> > Ahh, the typical python-sip, python-qt4 impedance mismatch..
> > 
> > This looks like the qgis.core module is built against a non matching sip
> > version. If that is still 12.3, I bet, you updated to KDE 4.11.something.
> 
> I think so as well. But if that is not the one in OBS for python in general,
> then where is it from?
> 
> > Mind pointing me to the qgis package, you're suffering from?
> 
> It has been this way for a while. I do not think it started with KDE 4.11,
> The package is from Application:Geo. I currently have installed
> qgis2-2.0.1-6.5.i586. My python is python-2.7.3-10.8.1.i586

It started when you decided to install some non distribution KDE upgrade.

KDE comes with newer python-sip versions all the time. That is building the 
bridges between Python, Qt, and KDE, as it makes the latter C(++) libs 
available as Python bindings. 

If some other program does bind its own C++ module with sip, such as qgis, it 
has to recreate the binding, if the sip library version was bumped.

Due to major advances in python-sip, this was necessary. It has grown major 
improvements for simple C bindings targeted at raspberry pi and the like, as 
well as improved Python3 and Qt5 support, that imposed binary 
incompatibilities in the low level binding interfaces/protocols. 

IOW, the price is being payed for the progress made..

While Linux is able to deal with multiple library revisions unlike the "other" 
OS, this cannot be dealt with easily in Python. This would need adding 
mechanisms to prefer one lib over another for certain modules, without 
modifications to those modules, e.g. LD_PRELOAD for Python.

BTW, this time, the python-sip hurdle is a bit higher than usual, as some 
private methods need to be declared, if used. I branched qgis and its deps in 
home:frispete:geo and fixed the fallout.. While at it, I fixed the spec to be 
usable without turning off post processing checks. Hopefully. Build is under 
way. It would be nice, if you could test my builds, if they succeed.

Cheers,
Pete


More information about the PyQt mailing list