Installing PyQt5 from sources: Unable to import Py

2019-02-19 07:32发布

问题:

I'm trying to build PyQt5 from the sources. I'm running fedora 28 and I installed Qt5 via dnf. Installing Sip following this seems OK. But when i try to configure PyQt i got this error:

# python3 configure.py -q /usr/bin/qmake-qt5
Querying qmake about your Qt installation...
Error: Unable to import PyQt5.sip. Make sure you have configured SIP to
create a private copy of the sip module.

According to the doc I did:

# python3 configure.py --sip-module private.sip
# python3 configure.py -q /usr/bin/qmake-qt5 -n private.sip

But i still get the error. So I'm guessing I'm not using it properly. Any suggestions ?

P.S: I know (and i did) that it can be done via pip but i'm facing the same problem than here

回答1:

Are you trying to install sip-4.19.10 and PyQt5_gpl-5.11.1?

Try a combination of sip-4.19.8 and PyQt5_gpl-5.10.1.

https://sourceforge.net/projects/pyqt/files/PyQt5/ https://sourceforge.net/projects/pyqt/files/sip/