运行环境:
Win10 Pycharm
安装pyqt5和pyqt5-tools
要求:
要求Python版本和pip版本均可满足要求。
输入指令:pip install pyqt5
安装发现:总是下载失败,从网上找到国内服务器,从新输入指令:
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting pyqt5
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/43/cf/f89c7e632014cb8725fc30b36292ca709a5b5598e4e99fff09cb677fc898/PyQt5-5.15.1-5.15.1-cp35.cp36.cp37.cp38.cp39-none-win32.whl
Collecting PyQt5-sip<13,>=12.8 (from pyqt5)
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/73/8c/c662b7ebc4b2407d8679da68e11c2a2eb275f5f2242a92610f6e5024c1f2/PyQt5_sip-12.8.1.tar.gz
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Building wheels for collected packages: PyQt5-sip
Building wheel for PyQt5-sip (PEP 517) ... error
Complete output from command *
running bdist_wheel
running build
running build_ext
building 'PyQt5.sip' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
Failed building wheel for PyQt5-sip
Running setup.py clean for PyQt5-sip
Failed to build PyQt5-sip
Could not build wheels for PyQt5-sip which use PEP 517 and cannot be installed directly
之后,安装完后,发现仍然不行,重启电脑后解决;