0

Please help in resolving this error.

enter image description here

Numpy is already installed. enter image description here

Priyah
  • 13
  • 1
  • 5

1 Answers1

0

Use pip to install the numpy first. Copy and run this code in your first cell.

!pip install numpy

If you need to upgrade pip then copy and run the below command in your first cell followed by the above command.

!python3 -m pip install --upgrade pip

You may have to restart your kernal after updating pip. Use restart option from Jupyter Notebook kernal option. see screenshot for reference. Kernal Restart

Another Option

If you want to downgrade your python from 3.10 to 3.9, as numpy is yet not supported by python 3.10. Then you can downgrade your python version from 3.10 to 3.9 via conda.

!conda install python=3.9
Shaida Muhammad
  • 1,428
  • 14
  • 25
  • I am getting the same issue agin I need to first change the python version from 3.10 to 3.9 somehow please help in doing that. 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 WARNING: You are using pip version 21.3.1; however, version 22.0.3 is available. You should consider upgrading via the '/Library/Frameworks/Python.framework/Versions/3.10/bin/python3 -m pip install --upgrade pip' command. Note: you may need to restart the kernel to use updated packages. – Priyah Feb 23 '22 at 04:19
  • Have you installed Anaconda? – Shaida Muhammad Feb 23 '22 at 04:28
  • no sorry, i do not have anaconda I am a beginner i started this today and had 2 versions of python installed which lead to all the trouble and then realized NumPy works only with 3.9. – Priyah Feb 23 '22 at 04:30
  • when i do pip install it leads to the error that I pasted above – Priyah Feb 23 '22 at 04:31
  • Install Anaconda. Then you can use whatever version of python for your project. – Shaida Muhammad Feb 23 '22 at 05:24