无法构建使用PEP 517的NumPy轮,因此无法直接安装。

5

我看到了很多关于这个问题的帖子,尝试了几乎所有的解决方案,但最终仍然遇到了相同的错误。我正在尝试使用pip 20.2.4安装numpy包。我收到了下面的错误信息。

无法构建numpy ERROR: Could not build wheels for numpy which use PEP 517 and cannot be installed directly

我尝试了以下所有命令,但已经没有更多的想法了:

pip install --upgrade pip setuptools wheel

sudo pip install numpy --no-binary :all:

我一直收到相同的消息:

无法构建numpy ERROR: Could not build wheels for numpy which use PEP 517 and cannot be installed directly

您有其他想法来解决这个问题吗?谢谢!


你为什么要使用 --no-binary :all: - anthony sottile
1个回答

1

以下是我认为和你遇到的相似错误。

输入图像描述

我通过安装“Visual Studio 2019的Build Tools”并安装桌面C++编译器部分解决了这个问题。

步骤

  1. 进入Microsoft Studio 下载页面,在"All Downloads" > "Tools for Visual Studio 2019" 部分中查找。

  2. 下载“Visual Studio 2019的Build Tools”。

  3. 安装C++编译器包(需要具有提升的特权)。

  4. 重试pip安装 pip install numpy

  5. 享受吧。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接