ERROR: Failed building wheel for numpy , ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects
ERROR: Failed building wheel for numpy , ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects
我在我的项目中使用 python poetry(https://python-poetry.org/) 进行依赖管理。
尽管当我 运行 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
我的笔记本电脑上安装了 python 3.9。
我使用 pip install numpy
安装了 numpy 1.21.5,我什至试图将它的版本降低到 1.19.5。
虽然我遇到了同样的错误。
我发现很多人在 python 3.10 中遇到 ERROR: Failed building wheel for numpy
这个错误,他们通过将版本控制 python 降到 3.9 解决了这个问题,尽管这对我不起作用。
我通过以下步骤解决了这个问题:-
我用 pip install numpy
命令安装的 numpy 版本更新了 pyproject.toml(此文件包含所有 library/dependency/dev 依赖项)。
运行 poetry lock
更新 poetry.lock 文件(包含有关库的详细信息)
再次 运行 poetry install
,它应该可以正常工作。
有什么问题可以评论。
我会尽力回答的。
我尝试在 macOS 上使用 PyPy 安装 numpy。
我首先 运行 brew doctor
解决了这个问题,这表明我的命令行工具 (XCode) 已经过时了。然后我只是按照说明更新它们:
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install
这解决了问题。
我的配置:
- 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)]
我在我的项目中使用 python poetry(https://python-poetry.org/) 进行依赖管理。
尽管当我 运行 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
我的笔记本电脑上安装了 python 3.9。
我使用 pip install numpy
安装了 numpy 1.21.5,我什至试图将它的版本降低到 1.19.5。
虽然我遇到了同样的错误。
我发现很多人在 python 3.10 中遇到 ERROR: Failed building wheel for numpy
这个错误,他们通过将版本控制 python 降到 3.9 解决了这个问题,尽管这对我不起作用。
我通过以下步骤解决了这个问题:-
我用
pip install numpy
命令安装的 numpy 版本更新了 pyproject.toml(此文件包含所有 library/dependency/dev 依赖项)。运行
poetry lock
更新 poetry.lock 文件(包含有关库的详细信息)
再次 运行
poetry install
,它应该可以正常工作。
有什么问题可以评论。 我会尽力回答的。
我尝试在 macOS 上使用 PyPy 安装 numpy。
我首先 运行 brew doctor
解决了这个问题,这表明我的命令行工具 (XCode) 已经过时了。然后我只是按照说明更新它们:
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install
这解决了问题。
我的配置:
- 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)]