Build python3.5.1+pyqt5.6 development environment under MAC OS X

Source: Internet
Author: User

Statement: This article is quoted from http://blog.csdn.net/djstavav/article/details/50218157, and in its own practice has made the update and supplement, hope to be able to help you developers, less detours. Hardware and Software Environment
    • OS X EI Capitan
    • Python 3.5.1
    • PyQt 5.6.0
    • Pycharm 5.0
Objective

QT is an open-source, cross-platform GUI framework that provides application development interfaces for many computer languages, as well as an integrated development environment Qtcreator, UI authoring tools Qtdesigner, which are easy to use and speed up development. This paper completes the construction of the development environment based on Python3.5.1 QT5.

Installing the development Environment Python 3.5.1

https://www.python.org/downloads/mac-osx/, click Finish installation.

Sip 4.18

Https://www.riverbankcomputing.com/software/sip/download

Compiling the installation steps

tar xvf sip-4.18.tar.gzcd sip-4.18python3.5 configure.py -d /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packagesmakesudo make install
PyQt 5.5.1

Https://riverbankcomputing.com/software/pyqt/download5

Compiling the installation steps

Tar xvf pyqt-gpl-5.6.0.tar.gz

CD pyqt-gpl-5.6.0

python3.5 configure.py--qmake/usr/local/cellar/qt5/5.6.0/bin/qmake--disable=qtpositioning-d/Library/Frameworks/ Python.framework/versions/3.5/lib/python3.5/site-packages

Yes

Make here compiles C + + files, takes a long time, about 10 minutes

sudo make install

–qmake option to make Qmake path, you need to modify, and compile with the compile option disable-qtpositioning, if not added, there will be a compilation error

If your program needs to use this module, you can create a new header file, 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 the development environment

Knock down the following code in the terminal, if there is no error, the installation is successful.

python3.5 -c "import PyQt5"

Used in the Pycharm.

Pycharm is now the most popular Python ide, from the JetBrains company, they have other very good IDE, interested can try. Https://www.jetbrains.com/pycharm/?fromMenu, install finished, open Preferences->project interpreter Select the Python3.5.1 we just installed, click OK.

Complete

Build python3.5.1+pyqt5.6 development environment under MAC OS X

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.