QT is an open source Cross-platform GUI framework that provides an application development interface for many computer languages, as well as an integrated development environment Qtcreator, UI-making work Qtdesigner, easy to use and faster to develop. This paper completes the QT5 based on the Python3.5.1 development environment.
Hardware and Software Environment
OS X EI Capitan
Python 3.5.1
PyQt 5.5.1
Pycharm 5.0.1
Install the development environment
Python 3.5.1
Download Address https://www.python.org/downloads/mac-osx/, click Finish installation.
Sip 4.17
Download Address Https://www.riverbankcomputing.com/software/sip/download
Compiling installation steps
Tar xvf sip-4.17.tar.gz
CD sip-4.17
python3.5 configure.py-d/library/frameworks/python.framework/versions/3.5/lib/python3.5/site-packages
Make
sudo make install
PyQt 5.5.1
Download Address Https://riverbankcomputing.com/software/pyqt/download5
Compiling installation steps
Tar xvf pyqt-gpl-5.5.1.tar.gz
CD pyqt-gpl-5.5.1
python3.5 configure.py--qmake ~/workshop/qt5.5.1/5.5/clang_64/bin/qmake--disable=qtpositioning-d/Library/ Frameworks/python.framework/versions/3.5/lib/python3.5/site-packages
Make
sudo make install
--qmake option to develop the path of qmake, you need to modify your own, but also compiled with the compilation option disable-qtpositioning, if not, there will be a compilation error
If your program needs to use this module, you can create a new header file yourself, please refer to the StackOverflow in this article http://stackoverflow.com/questions/33446131/ Pyqt5-error-during-python3-configure-py-fatal-error-qgeolocation-h-file-no
Test development environment
In terminal, knock down the following code, if there is no error indicates that the installation was successful.
Python3.5-c "Import PyQt5"
Used in Pycharm.
Pycharm is now the most popular Python IDE, from JetBrains company, they also have other very good IDE, interested can go to try. Download address Https://www.jetbrains.com/pycharm/?fromMenu, install complete, open Preferences->project interpreter Choose the Python3.5.1 we just installed, Click OK.
Reference documents
Http://www.qt.io
http://www.pythonschool.net/pyqt/installing-pyqt-on-mac-os-x/
http://blog.15-cm.com/2015/09/13/pyqt5-pycharm/
Http://pyqt.sourceforge.net/Docs/PyQt5/installation.html#co-existence-with-pyqt4