1

Please help in resolving this error.

enter image description here

Numpy is already installed. enter image description here

7
  • What Python environment is your Jupyter Notebook running? Commented Feb 23, 2022 at 3:31
  • how do i check that? Commented Feb 23, 2022 at 3:32
  • stackoverflow.com/q/40694528/17769815 Commented Feb 23, 2022 at 3:32
  • yes it is working with 3.10.2. I even had uninstalled the 3.10 version still it is working with that. Commented Feb 23, 2022 at 3:50
  • how do I change the environment to 3.9? Commented Feb 23, 2022 at 3:51

1 Answer 1

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
Sign up to request clarification or add additional context in comments.

5 Comments

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.
Have you installed Anaconda?
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.
when i do pip install it leads to the error that I pasted above
Install Anaconda. Then you can use whatever version of python for your project.

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.