pyqt环境搭建

670 words

1、添加源服务器

1
2
conda config --add channels  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/

2、创建运行环境

1
2
3
4
5
6
7
8
9
10
11
# 创建虚拟环境
conda create --name pyqt6-python3.8 python=3.8

# 激活环境
conda activate pyqt6-python3.8

# 安装PyQt6
pip install PyQt6 -i https://pypi.tuna.tsinghua.edu.cn/simple/

# 安装PyQt6-tools
pip install PyQt6-tools -i https://pypi.tuna.tsinghua.edu.cn/simple/

3、vscode安装PYQT Integration插件

1
2
3
4
5
# pyuic6
D:\RJ\Miniconda\envs\pyqt6-python3.8\Scripts\pyuic6.exe

# Path of Qt designer
D:\RJ\Miniconda\envs\pyqt6-python3.8\Lib\site-packages\qt6_applications\Qt\bin\designer.exe