Please help in resolving this error.
-
What Python environment is your Jupyter Notebook running?BrokenBenchmark– BrokenBenchmark2022-02-23 03:31:01 +00:00Commented Feb 23, 2022 at 3:31
-
how do i check that?Priyah– Priyah2022-02-23 03:32:02 +00:00Commented Feb 23, 2022 at 3:32
-
stackoverflow.com/q/40694528/17769815BrokenBenchmark– BrokenBenchmark2022-02-23 03:32:47 +00:00Commented 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.Priyah– Priyah2022-02-23 03:50:00 +00:00Commented Feb 23, 2022 at 3:50
-
how do I change the environment to 3.9?Priyah– Priyah2022-02-23 03:51:03 +00:00Commented Feb 23, 2022 at 3:51
|
Show 2 more comments
1 Answer
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.

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

