1.先安装好Anaconda3的基本环境
建议采用Anaconda3安装方式,因为这里面有很全的第三方库,如同java中库一样。采用传统的python3.x也可以,不过问题会比较多,因为版本不同。我采用的采用Anaconda3安装方式。
2.安装PyQt5环境
pip install PyQt5 -i https://pypi.douban.com/simple
这里使用了豆瓣环境下载,可以加快下载速度,当然也可以使用清华的下下载环境。
3.Windows安装Qt的Designer工具包
PyQt5 不在提供常用的Qt工具,比如图形界面开发工具 Qt Designer、国际化翻译 工具 Liguist,所以还需要使用如下命令安装常用的Qt工具。
pip install PyQt5-tools -i https://pypi.douban.com/simple
4.pycharm配置QtDesigner与pyuic环境
(1).QtDesigner配置
Name QtDesigner
Program C:\MyInstallInformation\Anaconda3\Library\bin\designer.exe
Working directory $ProjectFileDir$
(2).Pyuic配置
Name Pyuic
Program C:\MyInstallInformation\Anaconda3\python.exe
Arguments -m PyQt5.uic.pyuic $FileName$ -o $FileNameWithoutExtension$.py
Working directory $FileDir$