Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Numpy is installed but still getting error

I am trying to run jupyter notebook and getting following error. I am using Win 7 with anaconda python 3.7.

ImportError: Something is wrong with the numpy installation. While importing we detected an older version of numpy in ['c:\users\paperspace\anaconda3\envs\tensorflow10\lib\site-packages\numpy']. One method of fixing this is to repeatedly uninstall numpy until none is found, then reinstall this version.

I have followed the steps mentioned in the error but still not working.

like image 439
Nishant Avatar asked Feb 15 '19 19:02

Nishant


People also ask

How do I fix numpy error?

Python Numpy not found or no module found 'numpy' error in vscode can be fixed by install the numpy module extension in vscode. We can also use pip or conda package managers to fix this issue. In case you have installed the module still same error is appearing that means have to activate the dedicated environment.

Why numpy is not installed?

The Python "ModuleNotFoundError: No module named 'numpy'" occurs when we forget to install the numpy module before importing it or install it in an incorrect environment. To solve the error, install the module by running the pip install numpy command.

How do I know if numpy is installed in Jupyter notebook?

Go to Python -> site-packages folder. There you should be able to find numpy and the numpy distribution info folder. If any of the above is true then you installed numpy successfully.

Why is NumPy not showing up in my Python code?

In that case numpy is actually installed but python just cannot seem to find it. Possible causes can be: that you run your python code with a different python version for which you installed numpy.

How to install NumPy in Ubuntu and Windows?

Follow these steps to install numpy in Windows – Firstly, Open Command Prompt from the Start Menu. Enter the command pip install numpy and press Enter. Wait for the installation to finish. Test the installation by using import numpy command in Python Shell. Generally, in Ubuntu, there are multiple versions of Python installed.

How to fix modulenotfounderror-no module named NumPy?

When you encounter the error ModuleNotFoundError: No module named 'numpy' you most likely have not, or not correctly, installed numpy. If you haven't installed it yet you can do so by running: Assuming that python still refers to a version of python 2 on your machine. Otherwise there is no need to run the install with python3.

Should I get NumPy?

Edit: Apparently this answer still gets attention occasionally. For anybody needing numpy, you almost certainly will be happier and more productive if you just go and get conda or miniconda which make installing all kinds of libraries like numpy very easy.


Video Answer


4 Answers

Run

pip3 uninstall numpy

until you receive a message stating no files available with numpy to uninstall and then you can freshly install numpy using

pip install numpy

and that will fix the issue.

like image 189
Sundeep Pidugu Avatar answered Oct 19 '22 06:10

Sundeep Pidugu


Remove the folder numpy and reinstall numpy. work for me. Code below

rm -rf ~/.local/lib/python3.6/site-packages/numpy
pip install numpy
like image 20
anthony .bm Avatar answered Oct 19 '22 04:10

anthony .bm


I was getting the error when I was trying to use Keras. This can be fixed by removing the numpy package continuously by running pip3 uninstall numpy. And checking the successful un-installation by opening a python terminal and importing numpy package.

like image 10
KK2491 Avatar answered Oct 19 '22 04:10

KK2491


This Means a Duplicated. Try pip uninstall numpy or pip3 uninstall numpy then sudo apt-get install python3-numpy

FOR (DEBIAN DIST)

like image 4
John Melody Me Avatar answered Oct 19 '22 04:10

John Melody Me