LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   PyQt broken after sip-4.16.9 upgrade (https://www.linuxquestions.org/questions/slackware-14/pyqt-broken-after-sip-4-16-9-upgrade-4175550562/)

marrowsuck 08-12-2015 06:32 AM

PyQt broken after sip-4.16.9 upgrade
 
Hello,

I just got this RuntimeError in python:
Code:

>>> from PyQt4 import QtCore
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: the sip module implements API v11.0 to v11.2 but the PyQt4.QtCore module requires API v9.1

I upgraded to PyQt-4.11.4, since PyQt-4.9.6 wouldn't compile.
Working now.

orbea 08-12-2015 02:22 PM

Thanks. I got this issue with Electrum-2.4 and upgrading PyQt to 4.11.4 also fixed it for me.

ivandi 08-12-2015 05:35 PM

HPLIP is affected too :(

Code:


~$ hp-systray -x

HP Linux Imaging and Printing System (ver. 3.15.2)
System Tray Status Service ver. 2.0

Copyright (c) 2001-15 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

Traceback (most recent call last):
  File "/usr/bin/hp-systray", line 107, in <module>
    import ui4.systemtray as systray
  File "/usr/share/hplip/ui4/systemtray.py", line 35, in <module>
    from .ui_utils import *
  File "/usr/share/hplip/ui4/ui_utils.py", line 35, in <module>
    from PyQt4.QtCore import *
RuntimeError: the sip module implements API v11.0 to v11.2 but the PyQt4.QtCore module requires API v9.1


chris.willing 08-12-2015 06:58 PM

Code:

chris@d6:~/src/Designer$ pyuic4 atest.ui >ui_atest.py
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/PyQt4/uic/pyuic.py", line 31, in <module>
    from PyQt4 import QtCore
RuntimeError: the sip module implements API v11.0 to v11.2 but the PyQt4.QtCore module requires API v9.1

Also, if all these API problems with new sip package drive an update to the PyQt package, could the missing designer plugin libpyqt4.so (was named libpythonplugin.so in 14.1) be included please? It just requires a change from:
Code:

make install DESTDIR=$PKG || exit 1
to
Code:

make install DESTDIR=$PKG INSTALL_ROOT=$PKG || exit 1
I understand Eric has included this fix in one of his repos, with no adverse effects that I've heard of since then
Quote:

Originally Posted by Alien Bob (Post 5352837)
The updated PyQt and the new PyQt5 packages I have built for my KDE 5 repository have the designer plugin included. I hope to release them in a couple of days (after I have rebuilt the whole of KDE 5 with new versions).


chris

jmpz 08-12-2015 07:44 PM

matplotlib is also effected. Is there any plan to upgrade the PyQt? A quick walk around I have applied is just downgrading the sip package.

urka58 08-13-2015 11:06 AM

Quote:

Originally Posted by chris.willing (Post 5405019)
Code:

chris@d6:~/src/Designer$ pyuic4 atest.ui >ui_atest.py
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/PyQt4/uic/pyuic.py", line 31, in <module>
    from PyQt4 import QtCore
RuntimeError: the sip module implements API v11.0 to v11.2 but the PyQt4.QtCore module requires API v9.1

Also, if all these API problems with new sip package drive an update to the PyQt package, could the missing designer plugin libpyqt4.so (was named libpythonplugin.so in 14.1) be included please? It just requires a change from:
Code:

make install DESTDIR=$PKG || exit 1
to
Code:

make install DESTDIR=$PKG INSTALL_ROOT=$PKG || exit 1
I understand Eric has included this fix in one of his repos, with no adverse effects that I've heard of since then


chris

I upgraded to PyQt-4.11.4 using the slackbuild of PyQt-4.9.6 (plus the Phonon patch from Current_64 sources) and seems the plugin is installed

Code:

root@darkstar:/home/elio# find / -name libpyqt4.so
find: `/home/elio/.gvfs': Permission denied
/usr/lib64/qt/plugins/designer/libpyqt4.so
find: `/proc/1618/task/1618/net': Invalid argument
find: `/proc/1618/net': Invalid argument

My english isn't that good, may be you mean something else...
Ciao

chris.willing 08-13-2015 04:44 PM

Quote:

Originally Posted by urka58 (Post 5405292)
I upgraded to PyQt-4.11.4 using the slackbuild of PyQt-4.9.6 (plus the Phonon patch from Current_64 sources) and seems the plugin is installed

Code:

root@darkstar:/home/elio# find / -name libpyqt4.so
find: `/home/elio/.gvfs': Permission denied
/usr/lib64/qt/plugins/designer/libpyqt4.so
find: `/proc/1618/task/1618/net': Invalid argument
find: `/proc/1618/net': Invalid argument

My english isn't that good, may be you mean something else...
Ciao

However if you make a package, it does not include the libpyqt4.so file. The reason it exists on your system is because when you run 'make install DESTDIR=$PKG', the Makefile in the designer directory does not recognize DESTDIR and installs directly into the build machine, not into the package directory as expected.

chris

urka58 08-13-2015 05:14 PM

Quote:

Originally Posted by chris.willing (Post 5405415)
However if you make a package, it does not include the libpyqt4.so file. The reason it exists on your system is because when you run 'make install DESTDIR=$PKG', the Makefile in the designer directory does not recognize DESTDIR and installs directly into the build machine, not into the package directory as expected.

chris

Yes, you're right, the plugin is not in the package...I'm going to try with Eric's fix and see what differences I'll find in the package.
Ciao

UPDATE 14/08: alienbob's quick fix proposed by chris works and installs the plugin from the package or in other words the package has the plugin built in...if you prefer
Ciao

chris.willing 08-16-2015 07:29 AM

Today's -current updates included PyQt-4.11.4 which fixes the API errors I was seeing following the recent sip upgrade. The new PyQt package also contains the previously missing Designer plugin, so thumbs up from me.

chris


All times are GMT -5. The time now is 11:49 PM.