1.记得升级pip,升级后就会一路畅通的安装,无论是在终端通过命令安装,还是在pycharm中,通过设置,
python -m pip install --upgrade pip
升级后安装pyqt5,pyqt5-tools,pyqt5-stubs。
命令安装
pycharm->设置,来安装的方法。
可能的错误解决办法:
错误1:Preparing wheel metadata … error 或者这个错误就一直卡着
先安装wheel
pip install wheel -i https://pypi.tuna.tsinghua.edu.cn/simple
安装完成后,再次安装Pyinstaller
pip install Pyinstaller -i https://pypi.tuna.tsinghua.edu.cn/simple
错误2:
ERROR: Failed building wheel for PyQt5-sip
Failed to build PyQt5-sip
ERROR: Could not build wheels for PyQt5-sip, which is required to install pyproject.toml-based projects
终端输入:
pip install wheel
pip install sip
然后,下载后重新下载pyqt5。
安装成功后的软件包如下,部分可能多安装了。