Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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. 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

like image 403
Johnny Avatar asked Apr 20 '26 13:04

Johnny


2 Answers

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
like image 124
DGS Avatar answered Apr 23 '26 01:04

DGS


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
like image 25
krmogi Avatar answered Apr 23 '26 03:04

krmogi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!