AttributeError: module #39;sipbuild.api#39; has no attribute #39;prepare_metadata_for_build_wheel#39; for PyQt5 5.15.0(AttributeError:模块 sipbuild.api 没有 PyQt5 5.15.0 的属性 prepare_metadata_for_build_wheel)
问题描述
我尝试安装的程序需要安装 PyQt5 5.15.0 ,这给了我这个错误.奇怪的是,最新版本的 PyQt5 (5.15.2) 可以正常安装,但是这个程序特别需要 5.15.0.
A program I am trying to install requires the installation of PyQt5 5.15.0 , which gives me this error. The odd thing is that the installation works fine for the latest version of PyQt5 (5.15.2), but this program requires 5.15.0 specifically.
命令输出:
Collecting PyQt5==5.15.0
Using cached PyQt5-5.15.0.tar.gz (3.3 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... error
ERROR: Command errored out with exit status 1:
command: 'c:usersmshalappdatalocalprogramspythonpython39python.exe' 'C:UsersmshalAppDataRoamingPythonPython39site-packagespip\_vendorpep517\_in_process.py' prepare_metadata_for_build_wheel 'C:UsersmshalAppDataLocalTemp mp41s11ev6'
cwd: C:UsersmshalAppDataLocalTemppip-install-sfw90hvcpyqt5_e2cc46859b554da7b84798abae5378ba
Complete output (31 lines):
Traceback (most recent call last):
File "C:UsersmshalAppDataRoamingPythonPython39site-packagespip\_vendorpep517\_in_process.py", line 126, 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 "C:UsersmshalAppDataRoamingPythonPython39site-packagespip\_vendorpep517\_in_process.py", line 280, in <module>
main()
File "C:UsersmshalAppDataRoamingPythonPython39site-packagespip\_vendorpep517\_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:UsersmshalAppDataRoamingPythonPython39site-packagespip\_vendorpep517\_in_process.py", line 130, in prepare_metadata_for_build_wheel
return _get_wheel_metadata_from_wheel(backend, metadata_directory,
File "C:UsersmshalAppDataRoamingPythonPython39site-packagespip\_vendorpep517\_in_process.py", line 159, in _get_wheel_metadata_from_wheel
whl_basename = backend.build_wheel(metadata_directory, config_settings)
File "C:UsersmshalAppDataLocalTemppip-build-env-nnx_yu09overlayLibsite-packagessipbuildapi.py", line 51, in build_wheel
project = AbstractProject.bootstrap('pep517')
File "C:UsersmshalAppDataLocalTemppip-build-env-nnx_yu09overlayLibsite-packagessipbuildabstract_project.py", line 83, in bootstrap
project.setup(pyproject, tool, tool_description)
File "C:UsersmshalAppDataLocalTemppip-build-env-nnx_yu09overlayLibsite-packagessipbuildproject.py", line 479, in setup
self.apply_user_defaults(tool)
File "project.py", line 62, in apply_user_defaults
super().apply_user_defaults(tool)
File "C:UsersmshalAppDataLocalTemppip-build-env-nnx_yu09overlayLibsite-packagespyqtbuildproject.py", line 79, in apply_user_defaults
super().apply_user_defaults(tool)
File "C:UsersmshalAppDataLocalTemppip-build-env-nnx_yu09overlayLibsite-packagessipbuildproject.py", line 225, in apply_user_defaults
self.builder.apply_user_defaults(tool)
File "C:UsersmshalAppDataLocalTemppip-build-env-nnx_yu09overlayLibsite-packagespyqtbuilduilder.py", line 66, in apply_user_defaults
raise PyProjectOptionException('qmake',
sipbuild.pyproject.PyProjectOptionException
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:usersmshalappdatalocalprogramspythonpython39python.exe' 'C:UsersmshalAppDataRoamingPythonPython39site-packagespip\_vendorpep517\_in_process.py' prepare_metadata_for_build_wheel 'C:UsersmshalAppDataLocalTemp mp41s11ev6' Check the logs for full command output.
我使用的是最新版本的 pip.关于这个问题的根本原因的任何想法?
I am on the latest version of pip. Any ideas on the root cause of this issue?
推荐答案
帮助我将 pip 从 20.2.3 升级到最新版本(在我的例子中是 21.1.1)
What helped me is upgrading pip from 20.2.3 to the latest one (in my case 21.1.1)
这篇关于AttributeError:模块 'sipbuild.api' 没有 PyQt5 5.15.0 的属性 'prepare_metadata_for_build_wheel'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:AttributeError:模块 'sipbuild.api' 没有 PyQt5 5.15.0 的属性 'prepare_metadata_for_build_wheel'
基础教程推荐
- 使用生成器和迭代器时 Python 多循环失败 2022-01-01
- numpy float:比算术运算中内置的慢 10 倍? 2022-01-01
- 由Python将MP3转换为MIDI(类型错误:无法加载插件:mtg-Melodia:Melodia) 2022-01-01
- 在 Celery 工作人员中捕获 Heroku SIGTERM 以优雅地关 2022-01-01
- 用 Python 编写 Fortran 无格式文件 2022-01-01
- 将 x 轴刻度更改为自定义字符串 2022-01-01
- Discord.py 缺少必需的参数 2022-01-01
- pyserial - 可以从线程 a 写入串行端口,是否阻塞从线程 b 读取? 2022-01-01
- 尝试制作WhatsApp机器人 2022-01-01
- 与常规 dict 相比,Python manager.dict() 非常慢 2022-01-01
