[英]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:我的配置:
> 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:-我通过执行以下步骤解决了它:-
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 依赖项)。
Run poetry lock
to update poetry.lock file(contains details information about the library)运行
poetry lock
来更新poetry.lock文件(包含有关库的详细信息)
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.