nd for pyqt5== (env) [root@host-10-180-209-45 ~]# pip install pyqt5==5.15.0 -i https://pypi.douban.com/simple Looking in indexes: https://pypi.douban.com/simple Collecting pyqt5==5.15.0 Downloading https://pypi.doubanio.com/packages/8c/90/82c62bbbadcca98e8c6fa84f1a638de1ed1c89e85368241e9cc43fcbc320/PyQt5-5.15.0.tar.gz (3.3 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.3/3.3 MB 2.5 MB/s eta 0:00:00 Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... error error: subprocess-exited-with-error × Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [22 lines of output] Traceback (most recent call last): File "/root/python/env/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module> main() File "/root/python/env/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "/root/python/env/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 152, in prepare_metadata_for_build_wheel whl_basename = backend.build_wheel(metadata_directory, config_settings) File "/tmp/pip-build-env-uzsc1n8a/overlay/lib64/python3.8/site-packages/sipbuild/api.py", line 46, in build_wheel project = AbstractProject.bootstrap('wheel', File "/tmp/pip-build-env-uzsc1n8a/overlay/lib64/python3.8/site-packages/sipbuild/abstract_project.py", line 87, in bootstrap project.setup(pyproject, tool, tool_description) File "/tmp/pip-build-env-uzsc1n8a/overlay/lib64/python3.8/site-packages/sipbuild/project.py", line 586, in setup self.apply_user_defaults(tool) File "project.py", line 62, in apply_user_defaults super().apply_user_defaults(tool) File "/tmp/pip-build-env-uzsc1n8a/overlay/lib/python3.8/site-packages/pyqtbuild/project.py", line 70, in apply_user_defaults super().apply_user_defaults(tool) File "/tmp/pip-build-env-uzsc1n8a/overlay/lib64/python3.8/site-packages/sipbuild/project.py", line 237, in apply_user_defaults self.builder.apply_user_defaults(tool) File "/tmp/pip-build-env-uzsc1n8a/overlay/lib/python3.8/site-packages/pyqtbuild/builder.py", line 69, in apply_user_defaults raise PyProjectOptionException('qmake', sipbuild.pyproject.PyProjectOptionException [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed × Encountered error while generating package metadata. ╰─> See above for output. note: This is an issue with the package mentioned above, not pip.
时间: 2024-04-21 22:29:33 浏览: 242
解决安装pyqt5之后无法打开spyder的问题
5星 · 资源好评率100%
这个错误可能是由于 pyqt5==5.15.0 的构建要求问题导致的。建议检查一下相关要求是否正确,并确保已安装必要的构建依赖项。另外,也可以尝试更新 pip 版本,然后再次运行安装命令。需要注意的是,这个问题不是由 pip 引起的,而是由这个包本身引起的。如果问题仍然存在,请尝试联系包的开发人员获取更多帮助。
阅读全文