-
Notifications
You must be signed in to change notification settings - Fork 5
Could not import pygs #8
Comments
Is your PyQt5 working fine? |
Yes, I'm trying to make global shortcuts for my PyQt5 application. |
I've installed PyGlobalShortcut on python2 too, and the same error occurs. |
Maybe the extension linked to the wrong qt library? @skrech Could you paste the pip output? @Asvel maybe we should change the build process so that it generates extension for both PyQt5 and PyQt4 (e.g. pygs4 and pygs5). That way it would be possible to have one app that use pygs + pyqt4 and another app that use pygs + pyqt5 on the same system. Currently this is impossible. |
pip3 output: $ sudo pip3 install PyGlobalShortcut Installing collected packages: PyGlobalShortcut Successfully installed PyGlobalShortcut |
Thanks. The issue is that the pyqt extension links with Qt4 while the qxtGlobalShortcut (c++) links with Qt5. To properly build pygs on systems that have both PyQt4 and PyQt5, you must set the Could you try the following:
|
Add a check point to detect this situation. @ColinDuquesnoy |
Hmm I think virtualenv are ok for developpers but for not for end user. It maybe a real pain to install PyQt in a virtualenv (copying the PyQt5 folder from sites-packages does not always work). End user are not always python developers and don't care about python specific solution. What about application distributed by a linux distribution? They won't install in a virtualenv... Also if linux distributions provides support for both PyQt4 and PyQt5 I think we should do the same. |
You are right, let's figure out how to support coexisting. |
I would add a suffix. pygs4 would mean that it is built to work with You probably just have to rework your build functions a bit in setup.py. Try each API, skip the one that are not available and built each candidate separately. The good thing is that you already link statically with libQxt so there is no need to add a suffix to libQxt ;) |
Hi,
I'm having problem importing pygs. With python3 and PyQt5 when I import pygs, I'm getting:
Installed pygs using pip3:
sudo pip3 install PyGlobalShortcut
I'm on Ubuntu 14.10 x64.
The text was updated successfully, but these errors were encountered: