Linux set up Python (Anaconda)

Download and install Anaconda
Linux ships with Python installed, but we will be using some additional modules that are not installed by default. We will be installing these. We will then make sure you can start a terminal and run Python from the command line.

To install all of them at once, we will install Anaconda. Anaconda includes the Python programming language and a bunch of different pieces of software that are useful for data science and analysis. Although the collection includes all free software, it is put together by a commercial company called Continuum Analytics.

To install Anaconda, you should:


 * Download and install Anaconda. Follow the link and click on the big blue Download Anaconda button in the top right corner.
 * Make sure you download the installer for Python 2.7, NOT Python 3.4.
 * Once you have downloaded the installer, open a terminal and navigate to where you downloaded the installer (if you are not sure where it is, try typing cd ~/Downloads/ to move to your Downloads folder. Once there, type bash Anaconda- and then press tab to autocomplete the rest of the name of your downloaded file. Press enter to start the installer.
 * Use all of the defaults for installation unless you have a good reason not to.

More information
If you do not want to use the Anaconda installer, you can take a look at this page. However, set up will be significantly more difficult.

Opening up Python in the terminal
 Start up a Terminal. You can find the Terminal application at Applications/Accessories/Terminal, or it may already be on your menu bar.

This Terminal contains something called a command prompt. This command prompt is another way of navigating your computer and running programs -- just textually instead of graphically. We are going to be running Python and Python scripts from this command prompt.  Test your Python install at the command prompt. Type

python

and hit enter. You should see something like Python 2.7.8 |Anaconda 2.1.0 (64-bit)| (default, Aug 21 2014, 18:22:21) [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2 Type "help", "copyright", "credits" or "license" for more information. Anaconda is brought to you by Continuum Analytics. Please check out: http://continuum.io/thanks and https://binstar.org >>> 


 * You just started Python! The  indicates that you are at a new type of prompt: a Python prompt. The command prompt lets you navigate your computer and run programs, and the Python prompt lets you write and run Python code interactively.

 To exit the Python prompt, type

exit

and press Enter. This will take you back to the Linux command prompt. 

Success!
You have tested your Python installation!