Anaconda and Python Installation Guide

Reference: Anaconda Environment Cheat Sheet

What is the Anaconda Distribution?

Different libraries in Python can perform amazing tasks for data and computer science. Some of these libraries can be used to create graphs and plots of data, some could be used to access large datasets, and others could perform specific machine learning algorithms. These libraries all run on specific versions of the Python environment, which can differ between packages. The Anaconda Distribution contains a large collection of Python libraries and an environment management tool to make it easier for you to access all of the libraries you need.

Popular packages include NumPy, SciPy, Matplotlib, Seaborn, and Scikit-Learn to name a few.

Let's install Python 3.7 before we can install Anaconda.

The Anaconda version of Python 3.7 is the standard version of Python that is used on Cornell’s campus. Note that this version of Python only works for MacOS Sierra (10.12) or higher (you can check your MacOS version and update it accordingly in the Settings app:

Checking for software update. Settings update screen.

After verifying you are on a valid MacOS version, follow this link to download Anaconda 3.7 for MacOS, a desktop application from which you can launch Jupyter Notebook. Clicking this link will download the installation app for Anaconda; double click it to launch the installer and follow the steps.

  1. Click through the Introduction, Read Me, and License sections.
  2. In “Destination Select,” choose “Install on a specific disk…”. This is the option with the image of a hard drive underneath the option with the image of a house (the “Install for me only” option). Choose where to install Anaconda with the Choose Folder button, and select your Applications folder. After doing so, click the continue button.
  3. Select installation destination.
  4. Click the Install button in the bottom right corner to install the Anaconda application.
  5. Click the Install button.

Python has now been installed!

You can check to ensure proper installation by opening the Terminal app and typing “python” and hit the return key. The terminal will then show >>> |

Nice work! You have successfully entered the Python Interactive Shell.

HOWEVER: If this does NOT appear:

In the line immediately underneath where you typed “python” and hit return, check which version of Python is output. This is how you can check which version of Python you are running, and for most Cornell courses it is recommended to use iterations of Python 3.7.

What is the Anaconda Navigator?

The Anaconda Navigator is a Graphical User Interface (GUI) for managing Python. From the Navigator, you can install packages, create and edit environments, and launch Python specific applications. There are two methods to open the Anaconda Navigator application:

Note that you can move the Anaconda Navigator application to the Applications folder and then anywhere you’d like (into your Taskbar, onto your Desktop, in a specific folder, etc.), and open it. Once it loads, click the "Launch" button underneath Jupyter Notebook.

Launching Jupyter from the Anaconda Navigator.

After clicking Launch, the Jupyter Notebook tab should appear in your browser and look something like this:

Jupyter Notebook browser tab.

From here, you have two options. You can click the “New” button and select Python 3. This will create a brand new Notebook file that’s stored in the same directory that Anaconda is in. It should look something like this:

New Jupyter Notebook.

The other option is that you can move through different folders to get to where your .ipynb file is located. For example, if you have the notebook file on your Desktop, select the Desktop folder and then click on the specific file. An example could look like this:

Opened downloaded notebook.

Let's get started!

Let's begin by downloading and opening Tutorial 2: Getting Started with Jupyter Notebook . Click the start button:

Starting Tutorial 2

You will now be prompted with a download link for the Tutorial-2.ipynb notebook file. Click download.

Download prompts Chrome download

Move the file from your browser to the necessary destination. To make it easy, let's create a new folder on the Desktop and name it Jupyter Notebooks Intro.

Folder for files

Note: Tutorial 4 has a dataset to download. When working with external datasets (such as .csv files), store them in the same location as your notebook file.

Tutorial 4 csv

Open the folder with our file (Desktop --> Jupyter Notebooks Intro --> Tutorial-2.ipynb):

Opening the new folder in the Desktop Opening the tutorial-2

You have now opened Tutorial 2!

Tutorial-2.ipynb opened in Jupyter Notebook.