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. I'm using 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

4
  • Welcome to SO. Please provide a bit more detail. Like what your operating system is and how you're installing numpy as well as the full error. Commented Oct 18, 2021 at 1:46
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. Commented Oct 18, 2021 at 8:55
  • Does this answer your question? trying to install numpy in python3.9 and getting error in preparing wheel metadata in windows 10. I did not checked using virtual environment Commented Mar 3, 2022 at 12:37
  • This is asked every new version. I wish it were more Google-searchable answer Commented Mar 3, 2022 at 12:38

3 Answers 3

11

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. I managed to solve the problem by installing not the newest numpy 1.22.2 in pip. I install version 1.22.1.

Command:

pip install numpy==1.22.1
Sign up to request clarification or add additional context in comments.

Comments

5

Numpy has not yet released a precompiled wheel for Python 3.10. What you can do, is downgrade to 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").

You could also just use the pipwin module. Do this:

pip install pipwin

and then

pipwin install numpy

2 Comments

These unofficial binaries are only for Windows.
Install also fails for me, with a similar error, under Python3.9...
1

Note that wheels have been available for Python 3.10 since 5th November, see:

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

specifically, I can see Python wheels for labelled as version cp310 (i.e. CPython 3.10) for Linux, Mac and Windows.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.