简体   繁体   English

无法在 python 3.10 上安装 numpy

[英]Can't install numpy on python 3.10

I'm quite new to machine learning and when I tried to install numpy and this happended Can you guys help me fix this.我对机器学习很陌生,当我尝试安装 numpy 时,这发生了你们能帮我解决这个问题吗? I'm using python 3.10.0我正在使用 python 3.10.0

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错误:无法为 numpy 构建轮子 无法构建 numpy 错误:无法为 numpy 构建轮子,这是安装基于 pyproject.toml 的项目所必需的

Numpy has not yet released a precompiled wheel for Python 3.10. Numpy尚未发布 Python 3.10 的预编译轮。 What you can do, is downgrade to python 3.9.你可以做的是降级到 python 3.9。 If you don't want to do this, you can try the unofficial wheels available here .如果您不想这样做,可以尝试 此处提供的非官方轮子。

These are the important ones you should look for:这些是您应该寻找的重要内容:

  • numpy‑1.21.2+mkl‑cp310‑cp310‑win_amd64.whl
  • numpy‑1.21.2+mkl‑cp310‑cp310‑win32.whl

(Choose based on your OS architecture) (根据您的操作系统架构选择)

Then download the file, go to your downloads folder, and run pip install "<your_filename_choice>.whl") .然后下载文件,转到您的下载文件夹,然后运行pip install "<your_filename_choice>.whl")

You could also just use the pipwin module.您也可以只使用pipwin模块。 Do this:做这个:

pip install pipwin

and then接着

pipwin install numpy

I faced the same issue, I have a macos high sierra with python 3.10 and I have the same error while installing numpy in pip.我遇到了同样的问题,我有一个带有 python 3.10 的 macos high sierra,我在 pip 中安装 numpy 时遇到了同样的错误。 I managed to solve the problem by installing not the newest numpy 1.22.2 in pip.我设法通过在 pip 中安装不是最新的numpy 1.22.2来解决问题。 I install version 1.22.1 .我安装版本1.22.1

Command:命令:

pip install numpy==1.22.1

Note that wheels have been available for Python 3.10 since 5th November, see:请注意,自 11 月 5 日起,轮子已可用于 Python 3.10,请参阅:

https://pypi.org/project/numpy/#files https://pypi.org/project/numpy/#files

specifically, I can see Python wheels for labelled as version cp310 (ie CPython 3.10) for Linux, Mac and Windows.具体来说,我可以看到用于 Linux、Mac 和 Windows 的 Python 轮子标记为版本cp310 (即 CPython 3.10)。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM