Created
September 4, 2017 14:51
-
-
Save eruffaldi/7a00ba6fe9492d68800b453bbedab1dc to your computer and use it in GitHub Desktop.
PyQt5 Python 2.7 macOS 10.12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#updated from https://gist.github.com/kilfu0701/47b74a17a70b43549985 | |
brew install qt5 | |
brew install pyqt5 # for python 3.6 | |
## download SIP source code | |
wget http://sourceforge.net/projects/pyqt/files/sip/sip-4.19.3/sip-4.19.3.tar.gz | |
tar zxf sip-4.19.3.tar.gz | |
cd sip-4.19.3 | |
python configure.py | |
make | |
# skip this if already available in /usr/local/bin | |
make install | |
## environ for pyQT | |
export PATH="/System/Library/Frameworks/Python.framework/Versions/2.7/bin:$PATH" | |
export PATH="/usr/local/opt/qt/bin:$PATH" | |
## check for python's package path | |
python -c "import site; print site.getsitepackages()" | |
# | |
TODO set YOURSIP=... | |
## compile pyQT ... | |
python configure.py \ | |
-q /usr/local/opt/qt/bin/qmake \ | |
-d /Library/Python/2.7/site-packages/ \ | |
--sip $YOURSIP/sipgen/sip --sip-incdir=$YOURSIP/siplib | |
#/usr/local/lib/python2.7/site-packages/ | |
make | |
sudo make install | |
#python -c "import sys; from PyQt5 import QtCore, QtGui, QtWidgets |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment