Install Qt5 with homebrew and link it to the system (potentially destructive operation):
$ brew install qt5
$ brew unlink qt # may fail if no Qt4 was installed previously with homebrew
$ brew link --force qt5
Additionally, it might be worth to activate the appropriate target virtualenv with:
$ workon <target_virtualenv>
$ wget https://netix.dl.sourceforge.net/project/pyqt/sip/sip-4.19.1/sip-4.19.1.tar.gz
$ tar zxf sip-4.19.1.tar.gz
$ cd sip-4.19.1
Make sure the environment variable VIRTUAL_ENV
is set, and then:
$ python configure.py --deployment-target=10.12 --destdir=${VIRTUAL_ENV}/lib/python2.7/site-packages --incdir=${VIRTUAL_ENV}/include/python2.7
$ make
$ make install
$ wget https://kent.dl.sourceforge.net/project/pyqt/PyQt5/PyQt-5.8/PyQt5_gpl-5.8.tar.gz
$ tar zxf PyQt5_gpl-5.8.tar.gz
$ cd PyQt5_gpl-5.8
Make sure the environment variable VIRTUAL_ENV
is set, and then:
$ python configure.py --sip=${VIRTUAL_ENV}/bin/sip --sip-incdir=${VIRTUAL_ENV}/include/python2.7/ --qmake=/usr/local/bin/qmake --verbose
If configure
complains regarding the licence of XCode, do the following (Stack Overflow answer):
$ cd /Applications/Xcode.app/Contents/Developer/usr/bin/
$ sudo ln -s xcodebuild xcrun
$ make
$ make install
does not generate PyQt5.sip,