Import Error: No Module Named Numpy Anaconda
Solution 1:
If you are using Anaconda3 then you should already have numpy installed. There is no reason to use pip
. My guess is that the Anaconda distribution is possibly not on your path and you are picking up some other system python.
You should run where python
(or where python3
) to see which one you are using. If the executable is not in the Anaconda install, then that is your problem and you will need to edit your path environment variable to ensure that you are opening the python you want.
Solution 2:
First, remove the numpy from anaconda:
conda remove numpy
Then, install it back using pip
pip install numpy
This works for me.
Solution 3:
Anaconda installs python with it so whenever you are running python, you need to make sure you are using the one which anaconda installed. Use this command to know which python executable you are using right now. Keep the one installed by anaconda(typically inside anaconda folder) and uninstall any other.
where python
Solution 4:
It is possible that numpy is not installed in the virtual environment that you are using at runtime, but may be installed as part of the global anaconda install.
From the terminal first activate the enviroment.
$ source activate {your environment name}
Then install numpy with conda install
$ conda install numpy
I found that this was the case with an environment that I had created with pycharm.
Installing it locally corrected the issue.
Post a Comment for "Import Error: No Module Named Numpy Anaconda"