[PyQt] SIP API versions conflict

Phil Thompson phil at riverbankcomputing.com
Sun Dec 4 14:48:53 GMT 2016


On 2 Dec 2016, at 10:05 am, Vincent Vande Vyvre <vincent.vande.vyvre at telenet.be> wrote:
> 
> Hi,
> 
> I've a lib written in C++ wrapped for Python with SIP.
> 
> For Python 2 no problems.
> 
> For Python 3, I've an API version conflict.
> 
> Into the configure.py I've had these lines:
> 
> import sip
> print(sip, sip.SIP_VERSION_STR)
> 
> Now, I ran:
> --------------------------------------------
> vincent at djoliba:~/oqapy-3/trunk/lib/sip$ python3 configure.py
> <module 'sip' from '/usr/lib/python3/dist-packages/sip.cpython-34m-x86_64-linux-gnu.so'> 4.15.5
> vincent at djoliba:~/oqapy-3/trunk/lib/sip$ make
> g++ -c -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security  -D_FORTIFY_SOURCE=2 -fPIC -Wall -W -DNDEBUG -I. -I/usr/include/python3.4m -o sipoqapy_iproccmodule.o sipoqapy_iproccmodule.cpp
> g++ -Wl,-Bsymbolic-functions -Wl,-z,relro -shared -Wl,--version-script=oqapy_iproc.exp -o oqapy_iproc.so sipoqapy_iproccmodule.o sipoqapy_iprocOqapyIProc.o -L/usr/lib -L/usr/lib/x86_64-linux-gnu/ -lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_legacy -lopencv_contrib -lopencv_features2d -lopencv_ml -lopencv_gpu -loqapy-iproc
> vincent at djoliba:~/oqapy-3/trunk/lib/sip$ sudo make install
> [sudo] password for vincent:
> cp -f oqapy_iproc.so /usr/lib/python3/dist-packages/oqapy_iproc.so
> --------------------------------------------
> 
> and I try my lib:
> --------------------------------------------
> vincent at djoliba:~/oqapy-3/trunk/$ python3
> Python 3.4.3 (default, Nov 17 2016, 01:08:31)
> [GCC 4.8.4] on linux
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import sip
> >>> print(sip, sip.SIP_VERSION_STR)
> <module 'sip' from '/usr/lib/python3/dist-packages/sip.cpython-34m-x86_64-linux-gnu.so'> 4.15.5
> >>> from oqapy_iproc import OqapyIProc
> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
> RuntimeError: the sip module implements API v11.0 but the oqapy_iproc module requires API v11.1
> --------------------------------------------
> 
> How is it possible to have two different API's versions into the same module ?

It isn't.

> I'm on Ubuntu 14.04 and I use only the version from the Ubuntu repositories.

API v11.1 was implemented in SIP v4.16.

Phil


More information about the PyQt mailing list