当前位置:网站首页>Install pyqt5 and Matplotlib module
Install pyqt5 and Matplotlib module
2022-07-07 09:21:00 【Give you a little moon】
install PyQT5 And installation matplotlib modular
Preface
Previous blogs talked about how to install Python, Today's essay is based on the book , Share about PyQT5 Installation of and related modules , In order to facilitate each family to study PyQT5, It is convenient to write automated testing tools or understand this tool , So share this process !
Welcome to one button and three links , Pay attention, like to walk a wave (づ ̄ 3 ̄)づ
One 、 install PyQt5
install pyQT5 There are two ways
1. download PyQT5 Compile and install the latest source code of ( More trouble )
2. Use pip install Online installation ( The following describes this method )
=========================================================================
pip install PyQT5 -i https://pypi.douban.com/simple |
Be careful :
1. because Python The image used for installing the module is foreign by default , Due to network problems , Download foreign Python Modules often fail to download , So you need to use the domestic image download Python modular .
2. If prompted, I don't know install situation , Access to Scripts Directory . Such as D:\Users\xxx\AppData\Local\Programs\Python\Python39\Scripts
Then use the above installation instructions
pyQt5.9 No longer provide commonly used QT Tools , For example, graphical interface development tools QT Designer、 International translation tools Liguist, Therefore, you also need to use the following commands to install commonly used QT Tools
pip install PyQt5-tools -i https://pypi.douban.com/simple |
Be careful :
1. Because the blogger seems to have failed to install due to network problems in this step , Therefore, it has been updated in the process pip, Then install PyQt5-tools, Such as :python -m pip install --upgrade pip
Two 、 To configure PyQT5 Environment variables of
In order to make Windows The system can correctly identify PyQt5-tools Common commands , You need to put PyQt5-tools The installation directory of is added to the system environment variable Path in . Right click on the desktop “ My computer ”, Pop up the shortcut menu , choice “ attribute ”—>“ Advanced system setup ”——>“ senior ”, single click “ environment variable ” Button , In system variable Path Add the following variable values to ,
Such as :D:\Users\xxx\AppData\Local\Programs\Python\Python39\Lib\site-packages\pyqt5_tools
notes : This path is for bloggers to install PyQt5-tools The location of , Please revise it according to the actual situation
* Check whether the configuration is successful & test PyQt5 Environment installed successfully
1. Check whether the configuration is successful : Use Win+R Shortcut key , Enter... In the query box cmd, Enter into Windows Command window for , Input Path command , If everything goes well , Will be returned in Path See in path PyQT5-tools Installation path for , As shown in the figure below :
2. test PyQt5 Environment installed successfully : The file named testPyQt.py,py by Python Extension . The complete code is as follows :
import sys
from PyQt5 import QtWidgets,QtCore
app = QtWidgets.QApplication(sys.argv)
widget = QtWidgets.QWidget()
widget.resize(360,360)
widget.setWindowTitle(“hello,pyqt5”)
widget.show()
sys.exit(app.exec_())
stay windows In the system , double-click testPyQT.py file , If no error is reported , The following image interface pops up , shows PyQt5 Environment installed successfully
3、 ... and 、 install matplotlib modular
Enter the following command :
pip3 install matplotlib -i https://pypi.douban.com/simple |
==================== Thank you for watching. , Welcome to one button and three links (●’◡’●)============》END
Reference books :PyQt 5 Rapid development and actual combat
边栏推荐
- Difference between interface iterator and iteratable
- Cmake command line use
- Selenium mouse sliding operation event
- Connecting mobile phone with ADB
- [chaosblade: node disk filling, killing the specified process on the node, suspending the specified process on the node]
- Jenkins task grouping
- NVIC中断优先级管理
- How to count the number of project code lines
- PMP Exam Preparation experience, seek common ground while reserving differences, and successfully pass the exam
- JVM garbage collection detailed learning notes (II)
猜你喜欢
四、机器学习基础
十二、排序
Data association between two interfaces of postman
超十万字_超详细SSM整合实践_手动实现权限管理
Reading notes of pyramid principle
嵌套(多级)childrn路由,query参数,命名路由,replace属性,路由的props配置,路由的params参数
Integer or int? How to select data types for entity classes in ORM
Three updates to build applications for different types of devices | 2022 i/o key review
Skill review of test engineer before interview
端口复用和重映像
随机推荐
超十万字_超详细SSM整合实践_手动实现权限管理
Regular matching starts with XXX and ends with XXX
四、机器学习基础
Postman interface test (II. Set global variables \ sets)
PMP experience learning and sharing process
正则匹配以XXX开头的,XXX结束的
Systick滴答定时器
Two schemes of unit test
Locust performance test 5 (analysis)
LeetCode每日一题(2316. Count Unreachable Pairs of Nodes in an Undirected Graph)
外部中断实现按键实验
What is MD5
【Istio Network CRD VirtualService、Envoyfilter】
(3/8) method parameters of improper use of enumeration (2)
C language pointer (Part 2)
DRF defines views and routes
(3/8)枚举的不当用法 之 方法参数(二)
Original collection of hardware bear (updated on May 2022)
Cesium does not support 4490 problem solution and cesium modified source code packaging scheme
Postman interface test (I. installation and use)