pyqt5报错记录:ERROR: Failed building wheel for PyQt5-sip
问题:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | pip install pyqt5 Collecting pyqt5 Using cached PyQt5-5.15.10-cp37-abi3-win_amd64.whl.metadata (2.2 kB) Collecting PyQt5-sip<13,>=12.13 ( from pyqt5) Using cached PyQt5_sip-12.13.0.tar.gz (123 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Collecting PyQt5-Qt5>=5.15.2 ( from pyqt5) Using cached PyQt5_Qt5-5.15.2-py3-none-win_amd64.whl.metadata (552 bytes) Using cached PyQt5-5.15.10-cp37-abi3-win_amd64.whl (6.8 MB) Using cached PyQt5_Qt5-5.15.2-py3-none-win_amd64.whl (50.1 MB) Building wheels for collected packages: PyQt5-sip Building wheel for PyQt5-sip (pyproject.toml) ... error error: subprocess-exited-with-error × Building wheel for PyQt5-sip (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [5 lines of output] 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/ [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. 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 |
解决办法:
这个错误提示表明在构建PyQt5-sip时出现了问题,与之前提到的相同。错误信息指出需要安装Microsoft Visual C++ 14.0或更高版本。
你可以按照以下步骤解决问题:
-
确保你已安装了Microsoft Visual C++ Build Tools。你可以从以下链接中下载并安装:https://visualstudio.microsoft.com/visual-cpp-build-tools/
-
安装完Visual C++ Build Tools后,尝试重新安装PyQt5。可以使用以下命令:pip install pyqt5
特别是第一步的安装说明:
下载这个工具后,点击运行,会到如下的界面,选择第一个C++ 和右边的选项,然后点击右下角的安装,等待系统自动安装即可。
每天学习一点点,你就进步一点点。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· 什么是nginx的强缓存和协商缓存
· 一文读懂知识蒸馏
· Manus爆火,是硬核还是营销?
2020-04-16 java找不到javax.servlet.http.HttpServletResponse和javax.servlet.http.HttpServletRequest