gpt4 book ai didi

python - pip3 安装 PyQt5 --用户失败

转载 作者:行者123 更新时间:2023-12-02 08:50:36 24 4
gpt4 key购买 nike

尝试通过 pip3 安装 PyQt5 时出现错误。自动消息要求我添加更多详细信息,但我没有。所有细节都在代码中。

➜  ~ pip3 install PyQt5 --user 
Collecting PyQt5
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f2c97cfeb50>: Failed to establish a new connection: [Er
rno -2] Name or service not known')': /simple/pyqt5/
Using cached https://files.pythonhosted.org/packages/3a/fb/eb51731f2dc7c22d8e1a63ba88fb702727b324c6352183a32f27f73b8116/PyQt5-5.14.1.tar.gz
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... error
Complete output from command /usr/bin/python3 /usr/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp3yjy_ooq:
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 64, in prepare_metadata_for_build_wheel
hook = backend.prepare_metadata_for_build_wheel
AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 207, in <module>
main()
File "/usr/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 197, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/usr/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 67, in prepare_metadata_for_build_wheel
config_settings)
File "/usr/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 95, in _get_wheel_metadata_from_wheel
whl_basename = backend.build_wheel(metadata_directory, config_settings)
File "/tmp/pip-build-env-1ms8fm3e/overlay/lib64/python3.7/site-packages/sipbuild/api.py", line 51, in build_wheel
project = AbstractProject.bootstrap('pep517')
File "/tmp/pip-build-env-1ms8fm3e/overlay/lib64/python3.7/site-packages/sipbuild/abstract_project.py", line 82, in bootstrap
project.setup(pyproject, tool, tool_description)
File "/tmp/pip-build-env-1ms8fm3e/overlay/lib64/python3.7/site-packages/sipbuild/project.py", line 387, 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-1ms8fm3e/overlay/lib/python3.7/site-packages/pyqtbuild/project.py", line 86, in apply_user_defaults
super().apply_user_defaults(tool)
File "/tmp/pip-build-env-1ms8fm3e/overlay/lib64/python3.7/site-packages/sipbuild/project.py", line 202, in apply_user_defaults
self.builder.apply_user_defaults(tool)
File "/tmp/pip-build-env-1ms8fm3e/overlay/lib/python3.7/site-packages/pyqtbuild/builder.py", line 68, in apply_user_defaults
"specify a working qmake or add it to PATH")
sipbuild.pyproject.PyProjectOptionException

----------------------------------------
Command "/usr/bin/python3 /usr/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp3yjy_ooq" failed with error code 1 in /tmp/pip-install-6w4gkbyk/PyQt5

尝试直接安装Qt,以便在路径中获取QMake,但无济于事。

➜  ~ qmake --version
QMake version 2.01a
Using Qt version 4.8.7 in /usr/lib64
➜ ~

操作系统信息(Fedora 30)

 5.2.11-200.fc30.x86_64 #1 SMP Thu Aug 29 12:43:20 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

更多版本

➜  ~ pip3 --version
pip 19.0.3 from /usr/lib/python3.7/site-packages/pip (python 3.7)
➜ ~ python3 --version
Python 3.7.5
➜ ~

最佳答案

我在安装tensorflow时遇到了同样的错误。升级“setuptools”和“pip”到最新次要版本对我有用。

关于python - pip3 安装 PyQt5 --用户失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59780302/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com