AttributeError:模块“sipbuild.api”没有PyQt55.15.0的属性“prepare_metadata_for_build_wheel”
我尝试安装的程序需要安装 PyQt5 5.15.0 ,这给了我这个错误。奇怪的是,安装适用于最新版本的 PyQt5 (5.15.2),但该程序特别需要 5.15.0。
命令输出:
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:UsersmshalAppDataLocalTemptmp41s11ev6'
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-packagespyqtbuildbuilder.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:UsersmshalAppDataLocalTemptmp41s11ev6' Check the logs for full command output.
我正在使用最新版本的 pip。关于这个问题的根本原因的任何想法?
回答
帮助我的是pip从 20.2.3升级到最新版本(在我的例子中是 21.1.1)
THE END
二维码