Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check that the anaconda package was properly installed

Tags:

I'm completely new to Python and want to use it for data analysis. I just installed Python 2.7 on my mac running OSX 10.8. I need the NumPy, SciPy, matplotlib and csv packages. I read that I could simply install the Anaconda package and get all in one. So I went ahead and downloaded/installed Anaconda 1.7.

However, when I type in: import numpy as np

I get an error telling me that there is no such module. I assume this has to do with the location of the installation, but I can't figure out how to: A. Check that everything is actually installed properly B. Check the location of the installation.

Any pointers would be greatly appreciated!

Thanks

like image 677
marc Avatar asked Sep 26 '13 13:09

marc


People also ask

How do I check if Anaconda is installed or not?

Anaconda provides the command conda to return a lot of useful information. Click the Windows start menu —> All Programs —> Anaconda3 (64-bit) —> Anaconda Prompt (anaconda3) to open the anaconda prompt window. Input the command conda info and click the enter key, then it will list all the information about the anaconda installation.

How long does it take to install a package in Anaconda?

Installing a package in Anaconda takes at least 15 seconds, if the package is already installed the resolving environment still takes time:

Where is Anaconda Python installed on Windows?

1. The Steps To Find Where The Anaconda Python Is Installed On Windows. Click the Windows start menu —> All Programs —> Anaconda3 (64-bit) —> Anaconda Navigator (anaconda3) to open the Anaconda Navigator window. Then click the Environments menu item on the Anaconda Navigator window left side.

How to open Anaconda terminal in Windows 10?

Before you type in those commands that other answers told you, first go to control panel and check in programs to see if u have installed anaconda. If so then go to anaconda terminal from start menu or directly in anaconda installed folder in C drive.


2 Answers

You can determine which version of python you are running when you get the error by looking at the results of which python from the commandline. It is likely that you are running the system version (although recent versions Mac OS X include numpy in its system python), rather than Anaconda's python distribution. If this is the case, you need to modify your PATH as suggested by Anaconda at the end of the install process. Assuming it was installed in ~/anaconda, you would need to add something like:

export PATH=$HOME/anaconda/bin:$PATH

to your .bash_profile

like image 164
JoshAdel Avatar answered Oct 08 '22 02:10

JoshAdel


Though the question is not relevant to Windows environment, FYI for windows. In order to use anaconda modules outside spyder or in cmd prompt, try to update the PYTHONPATH & PATH with C:\Users\username\Anaconda3\lib\site-packages.

Finally, restart the command prompt.

Additionally, sublime has a plugin 'anaconda' which can be used for sublime to work with anaconda modules.

like image 32
Upendra Bittu Avatar answered Oct 08 '22 01:10

Upendra Bittu