PyQt5 installation tutorial

pip explanation

Pip is the installation package program of python, and pip can be understood as one of many packages in the python standard library.
However, pip is special in that it can manage other packages in the standard library .
In my opinion, pip can be used as a command program to install various packages in the python standard library.

Use of pip

If you want to install a certain package of python, just open cmd and enter it pip install +包名(
the rookie said it is really easy to use!)

Download of PyQt5

Open cmd, enter pip install PyQt5
and wait for the download to complete

Install PyQt5 tools

PyQt5.9 does not provide common Qt tools, such as graphical interface development tool Qt Designer, international translation tool Liguist, so common Qt tools need to be installed.
Open cmd and enter: pip install PyQt5-tools -i https://pypi.douban.com/simple
(Note, if pip has not been updated for a long time, it may cause the download to fail, such as me...)

pip-update

Open cmd and enter the following command

python -m pip install --upgrade pip

Configuration of environment variables

From the system, find this folder
Please add a picture description
and copy its directory path, then open the advanced system settings
Please add a picture description
and add the folder path just copied as a new path.
Please add a picture description

Check if the download was successful

Open cmd, enter: path, the system will pop up all your environment variables, you can find the PyQt5 tools you just added in it,
Please add a picture description
or directly open the python compiler, enter import PyQt5, and observe whether the compiler reports an error. If no error is reported, it means that the installation is successful
insert image description here

Guess you like

Origin blog.csdn.net/qq_52109814/article/details/122016024