Documenting the compilation process for PyQt5.8 under Python2.7 x64 bit

Source: Internet
Author: User

The QT library below Python is required for work. PYQT now only provides PYQT for the python3.x series, all of which need to be compiled manually. Prevent forgetting, deliberately write down notes record memo.

working Environment : Python version: Python2.7 x64 version, WIN10 64-bit system

demand qt version : Qt5.8

The compilation process is as follows:

1. Download the Qt5.8 version:

Http://mirrors.ustc.edu.cn/qtproject/archive/qt/5.8/5.8.0/qt-opensource-windows-x86-msvc2015_64-5.8.0.exe

I installed the Visual Studio 2015 community version of the compiler, so the QT version chosen is qt-opensource-windows-x86-msvc2015_64-5.8.0.exe

2. Download the sip-4.19.2 to provide Python wrap Qt.

Https://sourceforge.net/projects/pyqt/files/sip/sip-4.19.2/

The author chooses the sip-4.19.2 version under the window platform.

3. Download PYQT5_GPL

Https://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-5.8.2/

The author chooses is the window platform under PyQt-5.8.2

4. Install QT and set environment variables, I use QT default installation to C drive.

Set the following in the system environment variable (restart the computer after Setup is complete):

New variable name: Qtdir, Value: C:\Qt\Qt5.8.0\5.8\msvc2015_64

To add a path to the PATH variable: C:\Qt\Qt5.8.0\5.8\msvc2015_64\bin

5. First compile the SIP

Open the vs2015 x64 Local Tool command, and enter the following command line:

CD sip-4.19. 2  Install

6. Compiling PyQt5.8

Open the vs2015 x64 Local Tool command, and enter the following command line:

CD pyqt5_gpl-5.8. 2  Install

If encountering the following error, compile QTNFC error, I do not need this entry communication library, so take the following error ignore compile the library.

Rename the C:\QT\QT5.8.0\5.8\MSVC2015_64\INCLUDE\QTNFC directory to C:\Qt\Qt5.8.0\5.8\msvc2015_64\include\QtNfc-disable.

You need to re-execute Python.exe configure.py and make.

7. Make PyQt5.8 Morning Install package

Cond

Documenting the compilation process for PyQt5.8 under Python2.7 x64 bit

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.