![PyQt编程快速上手](https://wfqqreader-1252317822.image.myqcloud.com/cover/223/47131223/b_47131223.jpg)
上QQ阅读APP看书,第一时间看更新
1.1.1 在不同系统上安装
1.Windows系统
在Windows系统上,我们可以直接使用“pip install pyqt5= =5.15.4”命令安装PyQt,如图1-1所示。
![](https://epubservercos.yuewen.com/22D9F3/26478414501233006/epubprivate/OEBPS/Images/tx1056.jpg?sign=1738941516-Mn5AxuvLW7itln3T4sOgC0eOLD5C1eIe-0-0824e103ee741248bd07111edd838764)
图1-1 在Windows系统上安装PyQt
如果安装速度太慢或出现ReadTimeoutError错误,可以转为从国内源安装,将上述命令修改如下。
pip install pyqt5==5.15.4 -i https://pypi.tuna.tsinghua.edu.cn/simple
2.macOS系统
在macOS系统上,我们同样可以使用 pip 命令安装PyQt,在终端中执行“pip3 install pyqt5= =5.15.4”命令即可,如图1-2所示。
![](https://epubservercos.yuewen.com/22D9F3/26478414501233006/epubprivate/OEBPS/Images/tx1066.jpg?sign=1738941516-sCfTF5vsHaEbwG78fUMvNxQtSraDmrud-0-0358104f496f23243d5691aaf0755d7b)
图1-2 在macOS系统上安装PyQt
3.Ubuntu系统
在Ubuntu系统上,我们可以使用“sudo apt-get install python3-pyqt5”命令安装PyQt,如图1-3所示。
![](https://epubservercos.yuewen.com/22D9F3/26478414501233006/epubprivate/OEBPS/Images/tx1075.jpg?sign=1738941516-04JUdMDl0WPW3fNj5KfMFujnS3Dsn446-0-188f794ff67a08740903b234dd19e107)
图1-3 在Ubuntu系统上安装PyQt