简体   繁体   English

错误:无法为 numpy 构建轮子,错误:无法为 numpy 构建轮子,这是安装基于 pyproject.toml 的项目所必需的

[英]ERROR: Failed building wheel for numpy , ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects

I`m using python poetry( https://python-poetry.org/ ) for dependency management in my project.我在我的项目中使用 python 诗歌( https://python-poetry.org/ )进行依赖管理。

Though when I`m running poetry install , its giving me below error.虽然当我运行poetry install时,它给了我以下错误。

ERROR: Failed building wheel for numpy
  Failed to build numpy
  ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects

I`m having python 3.9 installed in my laptop.我的笔记本电脑上安装了 python 3.9。
I installed numpy 1.21.5 using pip install numpy , I even tried to down version it to 1.19.5.我使用pip install numpy ,我什至尝试将其版本降低到 1.19.5。

Though I`m getting the same error.虽然我得到了同样的错误。

I found out many people are getting ERROR: Failed building wheel for numpy this error in python 3.10, they solved it by down versioning python to 3.9, though that didnt working for me.我发现很多人都收到ERROR: Failed building wheel for numpy这个错误在 python 3.10 中,他们通过将 python 版本降低到 3.9 来解决它,虽然这对我没有用。

I had this trying to install numpy with PyPy on macOS.我试图在 macOS 上使用 PyPy 安装 numpy。

I solved the issue by first running brew doctor , which showed that my Command Line Tools (XCode) were outdated.我通过首先运行brew doctor解决了这个问题,这表明我的命令行工具(XCode)已经过时了。 Then I just followed the instructions to update them:然后我只是按照说明更新它们:

sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install

This solved the issue.这解决了这个问题。


My configuration:我的配置:

  • macOS 12.2.1 Monterey macOS 12.2.1 蒙特雷
> python --version
Python 3.8.12 (9ef55f6fc369, Oct 25 2021, 05:10:01)
[PyPy 7.3.7 with GCC Apple LLVM 13.0.0 (clang-1300.0.29.3)]

I solved it by doing the following steps:-我通过执行以下步骤解决了它:-

  1. I updated the pyproject.toml(This file contains all the library/dependency/dev dependency)with the numpy version that I installed using pip install numpy command.我使用pip install numpy命令安装的 numpy 版本更新了 pyproject.toml(此文件包含所有库/依赖项/dev 依赖项)。 在此处输入图像描述

  2. Run poetry lock to update poetry.lock file(contains details information about the library)运行poetry lock来更新poetry.lock文件(包含有关库的详细信息) 在此处输入图像描述

  3. Run poetry install again, & it should work fine.再次运行poetry install ,它应该可以正常工作。

If you are having any problems, you can comment.如果您有任何问题,您可以发表评论。 I`ll try to answer it.我会试着回答它。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误:无法为 gevent 构建轮子,这是安装基于 pyproject.toml 的项目所必需的 - ERROR: Could not build wheels for gevent, which is required to install pyproject.toml-based projects 如何解决错误:无法为 hdbscan 构建轮子,这是安装基于 pyproject.toml 的项目所必需的 - How to resolve ERROR: Could not build wheels for hdbscan, which is required to install pyproject.toml-based projects 错误:无法为 pycairo 构建轮子,这是安装基于 pyproject.toml 的项目所必需的 - ERROR: Could not build wheels for pycairo, which is required to install pyproject.toml-based projects 错误:无法为 pymssql 构建轮子,这是安装基于 pyproject.toml 的项目所必需的 - ERROR: Could not build wheels for pymssql, which is required to install pyproject.toml-based projects 错误:无法为 coincurve 构建轮子,这是安装基于 pyproject.toml 的项目 (Linux) 所必需的 - ERROR: Could not build wheels for coincurve, which is required to install pyproject.toml-based projects (Linux) 错误:无法为 ripser 构建轮子,这是安装基于 pyproject.toml 的项目所必需的 - ERROR: Could not build wheels for ripser, which is required to install pyproject.toml-based projects 错误:无法为 pycocotools 构建轮子,这是安装基于 pyproject.toml 的项目所必需的 - ERROR: Could not build wheels for pycocotools, which is required to install pyproject.toml-based projects 错误:无法为 pyaudio 构建轮子,这是安装基于 pyproject.toml 的项目所必需的 - ERROR: Could not build wheels for pyaudio, which is required to install pyproject.toml-based projects 错误:无法为 pandas 构建轮子,这是安装基于 pyproject.toml 的项目所必需的 - ERROR: Could not build wheels for pandas, which is required to install pyproject.toml-based projects Python 错误:无法为 cx_Oracle 构建轮子,这是安装基于 pyproject.toml 的项目所必需的 - Python ERROR: Could not build wheels for cx_Oracle, which is required to install pyproject.toml-based projects
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM