[SOLVED] Getting an error saying "Could not build wheels for numpy which use PEP 517 and cannot be installed directly" while installing numpy

Issue

I am trying to install a specific version of numpy using the command pip install numpy=1.19.1 in a python virtual environment. But I am getting the following errors

ERROR: Failed building wheel for numpy
Failed to build numpy
ERROR: Could not build wheels for numpy which use PEP 517 and cannot be installed directly

How do I solve this? I am using Python 3.9.6 and Pip 21.1.3. And I am on macOS Big Sur.

Solution

I think NumPy is not yet being prepared for Python 3.9 since they need to check a lot of times. You should try Python 3.7 or 3.8 is better.

See this thread: https://github.com/numpy/numpy/issues/17569

Edit: Based on the latest news on numpy’s website (dated 31st December) Numpy appears to now be supporting python 3.9 and 3.10 as well

Answered By – dhgoratela

Answer Checked By – Marie Seifert (BugsFixing Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *