[英]AssertionError: would build wheel with unsupported tag ('cp310', 'cp310', 'linux_x86_64')
I've got this message when I try to install numpy using Python 3.10.当我尝试使用 Python 3.10 安装 numpy 时收到此消息。
How to fix this?如何解决这个问题?
Copying numpy.egg-info to build/bdist.linux-x86_64/wheel/numpy-1.19.3-py3.10.egg-info
running install_scripts
Traceback (most recent call last):
File "/home/walenty/.local/lib/python3.10/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
main()
File "/home/walenty/.local/lib/python3.10/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/home/walenty/.local/lib/python3.10/site-packages/pip/_vendor/pep517/_in_process.py", line 204, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "/tmp/pip-build-env-plb3t7s6/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 211, in build_wheel
return self._build_with_temp_dir(['bdist_wheel'], '.whl',
File "/tmp/pip-build-env-plb3t7s6/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 197, in _build_with_temp_dir
self.run_setup()
File "/tmp/pip-build-env-plb3t7s6/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 248, in run_setup
super(_BuildMetaLegacyBackend,
File "/tmp/pip-build-env-plb3t7s6/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 142, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 508, in <module>
setup_package()
File "setup.py", line 500, in setup_package
setup(**metadata)
File "/tmp/pip-install-p3yq92pw/numpy/numpy/distutils/core.py", line 169, in setup
return old_setup(**new_attr)
File "/tmp/pip-build-env-plb3t7s6/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 165, in setup
return distutils.core.setup(**attrs)
File "/usr/local/lib/python3.10/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/lib/python3.10/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/local/lib/python3.10/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-plb3t7s6/overlay/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 328, in run
impl_tag, abi_tag, plat_tag = self.get_tag()
File "/tmp/pip-build-env-plb3t7s6/overlay/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 278, in get_tag
assert tag in supported_tags, "would build wheel with unsupported tag {}".format(tag)
AssertionError: would build wheel with unsupported tag ('cp310', 'cp310', 'linux_x86_64')
----------------------------------------
ERROR: Failed building wheel for numpy
Failed to build numpy
ERROR: Could not build wheels for numpy which use PEP 517 and cannot be installed directly
It's a bug in python 3.10, a workaround is installing numpy with the --no-use-pep517
flag.这是 python 3.10 中的一个错误,解决方法是--no-use-pep517
标志安装 numpy。 Eg: pip3.10 install numpy --no-use-pep517
例如: pip3.10 install numpy --no-use-pep517
There's a fix for this on the way though, so just waiting is an option as well.不过,在路上有一个解决方案,所以等待也是一种选择。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.