本文介紹了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'的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!