Python: Install Python

 

While Python 3 has been out now for a while, Python is not backwards compatible and most data science based libraries run on old reliable Python 2.7.  So that is the version I will be teaching.

If you are an advanced computer user, you can run both versions of Python on your computer simultaneously. Feel free to do so if you want to see the differences in the versions. While version 3 is  becoming more widely used in some areas, most of the libraries and information you will find involving Data Science or Analytics will still use version 2.7.

Downloading Python

Now, you can always download Python at http://www.python.org. However, I recommend downloading Anaconda. This distribution comes with more than 400 of the more popular Python packages in math, science, engineering, and more importantly – data analysis. The link to download Anaconda is: Anaconda Download.

For detailed installation instructions: Anaconda Install

Again, you do not need to use the Anaconda distribution of Python, but it will make following along with my tutorials much easier.

Another great advantage of Anaconda is that is comes with iPython already installed, which is a very popular IDE used by Data Scientists.

Running Python

Once you have Anaconda installed, open the Anaconda Prompt

pythonInstall.jpg

It will open like a Command Prompt / Terminal Window

At the prompt type: jupyter notebook

The Jupyter Notebook will open your default browser.

To start using Python, go to New in the upper right corner and select Python 2

pythonInstall1.jpg

Double Click Untitled at the top of your new notebook to change the name. Let’s  call this one Fundamentals

pythonInstall2

pythonInstall3

Using the Notebook

In Jupyter Notebooks, we work in the shaded rectangles marked In[]. To see the output of your command, you press Shift+Enter. Enter alone adds another line to the code block you are working on, but does not execute the code.

pythonInstall4

** note in the second example, Python only executes 1-2. Make sure when you have separate executable, you hit Shift+Enter each one.

 


If you enjoyed this lesson, click LIKE below, or even better, leave me a COMMENT

Follow this link for more Python content: Python

Next: Fundamentals

Please Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s