Download the installation package and install PySide2 to the windows system

20201206 Revision: Modify the configuration description of tools in PyCharm

1. Download two .whl files to your local computer.

You can download it here https://mirrors.tuna.tsinghua.edu.cn/   

I have chosen the following two versions:

shiboken2-5.15.2-5.15.2-cp35.cp36.cp37.cp38.cp39-none-win_amd64.whl

PySide2-5.15.2-5.15.2-cp35.cp36.cp37.cp38.cp39-none-win_amd64.whl

2. Install whl file

Open the cmd of the Windows system, go to the path where the above files are saved, and directly execute the following command:

pip install shiboken2-5.15.2-5.15.2-cp35.cp36.cp37.cp38.cp39-none-win_amd64.whl

pip install PySide2-5.15.2-5.15.2-cp35.cp36.cp37.cp38.cp39-none-win_amd64.whl

The file will be automatically installed into the Python installation directory. The specific directory is: "******\Python\Python38\Lib\site-packages\PySide2",

Successful installation!

3. Configure in Pycharm

Customize two tools in PyCharm for development use. Steps: File- Settings- Tools- External Tools, open the page, click "+" to add three tools.

Name: Qt Designer
Program: D:\ProgramFiles\Python\Python38\Lib\site-packages\PySide2\designer.exe
Arguments:$FileName$
Working directory: $FileDir$
Name: PyUIC
Program: D:\ProgramFiles\Python\Python38\Lib\site-packages\PySide2\uic.exe
Arguments: $FileDir$ -o $FileNameWithoutExtension$.py
Working directory: $FileDir$
Name: Qt rcc
Program: D:\ProgramFiles\Python\Python38\Lib\site-packages\PySide2\rcc.exe
Arguments: $FileName$
Working directory: D:\ProgramFiles\Python\Python38\Lib\site-packages\PySide2

4. Compiler selection

When selecting Python Interpreter in Pycharm, please note that when selecting the compiler in the venv environment, because there is no downloaded Pyside6 in the venv environment, the user will be asked to download it again. So select python.exe that has been installed in the Python directory and directly call Pyside6 in site-packages.

Then you can develop Qt in Pycharm.

Guess you like

Origin blog.csdn.net/weiweiqiao/article/details/132760562