一、Python3.6+PyQt5 安装

一、安装PyQt5

 

方法一:使用pip3工具直接安装

直接在命令行中输入:

Python 3.x

pip3 install PyQt5
pip3 install PyQt5-tools

Python 2.7x

pip install PyQt5
pip install PyQt5-tools

注意:后面一个安装了才有designer.exe这个工具,千万不要忘了。

问题详细在这里:https://stackoverflow.com/questions/41523597/Python-win-3-6-0-x64-issue-missing-qt-designer-exe-after-pip3-install-pyqt5

PyQt5-tools下载地址: https://pypi.python.org/pypi/pyqt5-tools

选择符合自己操作系统的版本下载后,在CMD中输入如下:

pip3 install wheel

pip3 install xxx\*.whl

方法二:下载安装

下载地址:https://riverbankcomputing.com/software/pyqt/download5

下载地址:https://pypi.python.org/pypi/PyQt5/

选择PyQt5-5.5.1-gpl-Py3.4-Qt5.5.1-x64.exeWindows 64 bit installer下载并安装

Note:

  1. 注意选择正确的Python版本和系统位数。

  2. 安装PyQt并不需要一些文章中提到的先安装sip和Qt的过程,因为在安装文件中已经包括。

测试是否安装成功

import PyQt5

没报错说明安装成功

原文地址:https://www.cnblogs.com/JackyXu2018/p/8665544.html