# PyQt5安装教程 **Repository Path**: chenshaohua/py-qt5-installation-tutorial ## Basic Information - **Project Name**: PyQt5安装教程 - **Description**: PyQt5怎么安装教程 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-01-09 - **Last Updated**: 2022-01-09 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # PyQt5安装教程 #### 介绍 PyQt5怎么安装教程 #### 软件架构 软件架构说明 #### 安装教程 1. 按windows菜单键,输入cmd并打开,进入dos窗口 2. 输入命令pip3 install sip(python2版本输入pip install sip,如果本机没有python2只有python3,那么pip和pip3等价)本机pip安装目录:(C:\Users\本机用户名\AppData\Local\Programs\Python\Python310\Scripts),pthon3默认自带 3. C:\Users\本机用户名>pip3 install sip 以下为执行命令过程及结果 Collecting sip Downloading sip-6.5.0-cp36-abi3-win_amd64.whl (538 kB) |████████████████████████████████| 538 kB 386 kB/s Collecting toml Downloading toml-0.10.2-py2.py3-none-any.whl (16 kB) Collecting packaging Downloading packaging-21.3-py3-none-any.whl (40 kB) |████████████████████████████████| 40 kB 865 kB/s Requirement already satisfied: setuptools in c:\users\本机用户名\appdata\local\programs\python\python310\lib\site-packages (from sip) (58.1.0) Collecting pyparsing!=3.0.5,>=2.0.2 Downloading pyparsing-3.0.6-py3-none-any.whl (97 kB) |████████████████████████████████| 97 kB 347 kB/s Installing collected packages: pyparsing, toml, packaging, sip Successfully installed packaging-21.3 pyparsing-3.0.6 sip-6.5.0 toml-0.10.2 WARNING: You are using pip version 21.2.4; however, version 21.3.1 is available. You should consider upgrading via the 'C:\Users\本机用户名\AppData\Local\Programs\Python\Python310\python.exe -m pip install --upgrade pip' command. 这里提示你的pip版本为21.2.4;可以更新到21.3.1版本,你应该考虑通过python.exe安装目录执行-m pip install --upgrade pip命令 1. 这里我们进入到安装目录,执行python -m pip install --upgrade pip(这是因为我们需要用python.exe这个文件为pip更新) 以下为执行命令过程及结果 Requirement already satisfied: pip in c:\users\本机用户名\appdata\local\programs\python\python310\lib\site-packages (21.2.4) Collecting pip Downloading pip-21.3.1-py3-none-any.whl (1.7 MB) |████████████████████████████████| 1.7 MB 313 kB/s Installing collected packages: pip Attempting uninstall: pip Found existing installation: pip 21.2.4 Uninstalling pip-21.2.4: Successfully uninstalled pip-21.2.4 Successfully installed pip-21.3.1 1. 然后我们执行pyqt5安装命令 C:\Users\本机用户名>pip install PyQt5 (如果官网下载慢,可以尝试用豆瓣镜像下载安装,命令为pip install PyQt5 -i https://pypi.douban.com/simple,本次默认安装PyQt5官方) Collecting PyQt5 Downloading PyQt5-5.15.6-cp36-abi3-win_amd64.whl (6.7 MB) |████████████████████████████████| 6.7 MB 384 kB/s Collecting PyQt5-sip<13,>=12.8 Downloading PyQt5_sip-12.9.0-cp310-cp310-win_amd64.whl (84 kB) |████████████████████████████████| 84 kB 368 kB/s Collecting PyQt5-Qt5>=5.15.2 Downloading PyQt5_Qt5-5.15.2-py3-none-win_amd64.whl (50.1 MB) |████████████████████████████████| 50.1 MB 3.3 MB/s Installing collected packages: PyQt5-sip, PyQt5-Qt5, PyQt5 Successfully installed PyQt5-5.15.6 PyQt5-Qt5-5.15.2 PyQt5-sip-12.9.0 PyQt5安装成功 可以在这个文件夹“C:\Users\本机用户名\AppData\Local\Programs\Python\Python310\Lib\site-packages”下看到,有个PyQt5的文件夹 安装PyQt5-tools 命令 pip install PyQt5-tools (如果官网下载慢,可以尝试用豆瓣镜像下载安装,命令为pip install PyQt5-tools -i http://pypi.douban.com/simple --trusted-host=pypi.douban.com,本次默认安装官方文件) Installing build dependencies ... / 提示正在安装生成依赖项dependencies(电脑有点慢) 等待中尝试打开py软件,提示note pyserial 中间穿插安装 C:\Users\本机用户名>pip3 install pyserial Collecting pyserial Downloading pyserial-3.5-py2.py3-none-any.whl (90 kB) |████████████████████████████████| 90 kB 177 kB/s Installing collected packages: pyserial Successfully installed pyserial-3.5 C:\Users\本机用户名> pyserial安装成功,依然打开不了, 打开命令为,进入所要运行程序的目录,右击,选择在window终端中打开 提示:qt.qpa.plugin: Could not find the Qt platform plugin "windows" in "" This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. qt.qpa.plugin插件:找不到Qt平台插件“windows”in"" 此应用程序无法启动,因为无法初始化Qt平台插件。重新安装应用程序可能会解决此问题。 因为QTtool安装实在太慢了,还没有安装上,用豆瓣镜像安装一下试一试 #### 使用说明 1. xxxx 2. xxxx 3. xxxx #### 参与贡献 1. Fork 本仓库 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request #### 特技 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md 2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) 6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)