1. Install pyqt6 and pyqt6-tools packages
Note: pyqt6-tools currently only supports python3.9 version, and the installation after version 3.9 is successful. (As of 2022.11.20)
1.1 Install pyqt6 and pyqt6-tools
Install pyqt and pyqt6-tools can be installed using conda and pip
(1) First create a python environment
#利用conda,创建python环境
conda create --name pyqt python=3.9
2) Activate the pyqt_env environment
#激活pyqt_env环境
conda activate pyqt
(3) Install pyqt6 and pyqt6-tools, it is recommended to use pip
pip install pyqt6
When you see successfully, it means the installation is successful.
After installing pyqt6 successfully, install pyqt6-tools
pip install pyqt6-tools
When you see successfully, it means success, and the red part means that some packages have not been installed successfully.
1.2 Precautions for installing pyqt6 and pyqt6-tools
To check whether the above two are installed successfully, you can use pip show <package name> to check
#例如
pip show pyqt6-tools
Two, configure vscode
1. Download and install PYQT Integration in VSCode
2. Configure pyqt integration
The Qtdesigner:Path at the bottom is incomplete, and it says:
/home/gao/.conda/envs/pyqt/lib/python3.8/site-packages/qt6_applications/Qt/bin/designer
In the explorer blank space, right click
The effect is the same as double-clicking to run designer.exe