I have a very similar question to this question. I have only one version of python 3.5 installed on my Windows 7 64-bit system. I installed Anaconda3.4 via official website - as suggested in the question. The installation went fine but when I want to import(I just typing python from the command line )
import numpy
Import error:No module named numpy
Then I exit and type
pip install numpy
Requirement already satisfied (use --upgrade to upgrade): numpy in d:\program fi les\anaconda3\lib\site-packages
I know this is probably a super basic question, but I'm still learning... Thanks
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.
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
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.
First, remove the numpy from anaconda:
conda remove numpy
Then, install it back using pip
pip install numpy
This works for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With