eric+pyqt5的安装

时间:2023-01-31 07:57:10


目录

​​直接用pip命令安装​​

​​环境准备​​

​​ 下载版本文件​​

​​安装whl版本文件​​

​​安装路径​​

​​安装过程记录​​

​​在eric下安装​​


直接用pip命令安装

环境准备

在2022-7-23的时间上,win10 商店里面的python默认为python 3.10版本,而此版本不能安装pyqt5-tools。在商店里面搜索python,找到3.8 版本安装,如果之前已经安装了3.10版本请先卸载:

eric+pyqt5的安装

 下载版本文件

 ​​pyqt5-tools · PyPI​

此时的版本是5.14.4.3.2,随着时间推移可能发生变化。 

安装whl版本文件

采用如下黑体命令

pip3 install pyqt5_tools-5.15.4.3.2-py3-none-any.whl

通过此命令实际安装了如下几个包:

这里可以看到已经按照了pyqt5,不需要再单独安装此包了,网上有很多教程教导先安装pyqt5 ,实在误人子弟。

qt5-applications, PyQt5-sip, PyQt5-Qt5, click, qt5-tools, pyqt5, python-dotenv, pyqt5-plugins, pyqt5-tools

安装路径

1)  安装过程中会提示一些路径信息,表明qt5-tools系列包安装的位置,例如本人的安装记录提示安装路径为:

C:\Users\xxx\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\   (参考下一节的安装过程记录)

 2) designer.exe的路径。

 网上很多教程直接写designer.exe路径,但是各个版本存在些差异,例如本人的电脑安装后在 

LocalCache\local-packages\Python38\site-packages\qt5_applications\Qt\bin

绝对路径参考 1)中。  在1) 中的路径中直接搜索designer.exe就可以搜到,而不需要刻舟求剑般照抄网上帖子的路径。

安装过程记录

提示安装了哪些包,及他们按照后的路径: 

C:\Users\xxx\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\Scripts
Processing c:\pyqt5_tools-5.15.4.3.2-py3-none-any.whl
Collecting click
Downloading click-8.1.3-py3-none-any.whl (96 kB)
|████████████████████████████████| 96 kB 36 kB/s
Collecting pyqt5-plugins<5.15.4.3,>=5.15.4.2.2
Downloading pyqt5_plugins-5.15.4.2.2-cp38-cp38-win_amd64.whl (67 kB)
|████████████████████████████████| 67 kB 8.5 kB/s
Collecting pyqt5==5.15.4
Downloading PyQt5-5.15.4-cp36.cp37.cp38.cp39-none-win_amd64.whl (6.8 MB)
|████████████████████████████████| 6.8 MB 16 kB/s
Collecting python-dotenv
Downloading python_dotenv-0.20.0-py3-none-any.whl (17 kB)
Collecting PyQt5-sip<13,>=12.8
Downloading PyQt5_sip-12.11.0-cp38-cp38-win_amd64.whl (78 kB)
|████████████████████████████████| 78 kB 10 kB/s
Collecting PyQt5-Qt5>=5.15
Downloading PyQt5_Qt5-5.15.2-py3-none-win_amd64.whl (50.1 MB)
|████████████████████████████████| 50.1 MB 51 kB/s

Collecting qt5-tools<5.15.2.2,>=5.15.2.1.2
Downloading qt5_tools-5.15.2.1.2-py3-none-any.whl (13 kB)
Collecting qt5-applications<5.15.2.3,>=5.15.2.2.2
Downloading qt5_applications-5.15.2.2.2-py3-none-win_amd64.whl (60.9 MB)
|████████████████████████████████| 60.9 MB 29 kB/s
Collecting click
Downloading click-7.1.2-py2.py3-none-any.whl (82 kB)
|████████████████████████████████| 82 kB 104 kB/s
Installing collected packages: qt5-applications, PyQt5-sip, PyQt5-Qt5, click, qt5-tools, pyqt5, python-dotenv, pyqt5-plugins, pyqt5-tools
WARNING: The script qt5-tools.exe is installed in 'C:\Users\xxx\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
WARNING: The scripts pylupdate5.exe, pyrcc5.exe and pyuic5.exe are installed in 'C:\Users\xxx\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
WARNING: The script dotenv.exe is installed in 'C:\Users\xxx\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
WARNING: The script pyqt5-tools.exe is installed in 'C:\Users\xxxx\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed PyQt5-Qt5-5.15.2 PyQt5-sip-12.11.0 click-7.1.2 pyqt5-5.15.4 pyqt5-plugins-5.15.4.2.2 pyqt5-tools-5.15.4.3.2 python-dotenv-0.20.0 qt5-applications-5.15.2.2.2 qt5-tools-5.15.2.1.2
在eric下安装
D:\eric6-17.12>pip install QScintilla (依赖于此开源的编辑软件)
Collecting QScintilla
Downloading QScintilla-2.10.2-5.9.3-cp35.cp36.cp37-none-win_amd64.whl (1.8MB)
38% |████████████▎ | 706kB 16kB/s eta 0:01:08 99% |███████████████████████████████▊| 1.8MB
99% |████████████████████████████████| 1.8MB
100% |████████████████████████████████| 1.9M
B 33kB/s
Requirement already satisfied (use --upgrade to upgrade): PyQt5>=5.9.0 in c:\pro
gram files\anaconda3\lib\site-packages (from QScintilla)
Requirement already satisfied (use --upgrade to upgrade): sip<4.20,>=4.19.4 in c
:\program files\anaconda3\lib\site-packages (from PyQt5>=5.9.0->QScintilla)
Installing collected packages: QScintilla
Successfully installed QScintilla-2.10.2D:\eric6-17.12>python install.py install
Checking dependencies
Python Version: 3.5.2
Found PyQt5
Found pyuic5
Found QScintilla2
Found QtGui
Found QtNetwork
Found QtPrintSupport
Found QtSql
Found QtSvg
Found QtWidgets
Found QtWebEngineWidgets
Qt Version: 5.9.3
sip Version: 4.19.6
PyQt Version: 5.9.2
QScintilla Version: 2.10.2
All dependencies ok.Cleaning up old installation ...
Creating configuration file ...
Compiling user interface files ...
Compiling source files ...
Installing eric6 ...
Installation complete.
Press enter to continue...
D:\eric6-17.12>