一、安装 PySide6 / PySide2
1.1、安装 PySide6
pip install pyside6
或者使用清华大学源安装
pip install pyside6 -i https://pypi.tuna.tsinghua.edu.cn/simple
1.2、安装 PySide2
pip install pyside2
或者使用清华大学源安装
pip install pyside2 -i https://pypi.tuna.tsinghua.edu.cn/simple
二、安装 PyQt6 / PyQt5
2.1、安装 PyQt6
pip install pyqt6
或
pip install pyqt6-tools
或者使用清华大学源安装
pip install pyqt6 -i https://pypi.tuna.tsinghua.edu.cn/simple
或
pip install pyqt6-tools -i https://pypi.tuna.tsinghua.edu.cn/simple
2.2、安装 PyQt5
pip install pyqt5
或
pip install pyqt5-tools
或者使用清华大学源安装
pip install pyqt5 -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install pyqt5-tools -i https://pypi.tuna.tsinghua.edu.cn/simple
加 -tools 即可同时安装 PyQt 和 一些重要的工具,比如 Qt designer。
三、Pycharm 安装 PyQt5
文件->设置-> 项目