How can I get to work PyQt 4 or 5 on a Mac with OS X Sierra? It seems that I have to wait for a new version of PyQt but I am not sure if that is actually true.
1:
brew install cartr/qt4/pyqt
brew link qt@4
2: go here and download https://riverbankcomputing.com/software/sip/download
and do
tar -xzvf sip-4.19.6.tar.gz
cd sip-4.19.6
python configure.py
make
make install
3: go here and download : https://riverbankcomputing.com/software/pyqt/download
and do
tar -xzvf PyQt4_gpl_mac-4.12.1.tar.gz
cd PyQt4_gpl_mac-4.12.1
python configure.py
make
make install
4: test in python:
import sys;
from PyQt4 import QtGui;
def pyqtDemo():
app = QtGui.QApplication(sys.argv);
w = QtGui.QWidget();
w.resize(250, 150);
w.move(300, 300);
w.setWindowTitle('Hello World');
w.show();
sys.exit(app.exec_());
pyqtDemo()