Anaconda

Introduction

At this point in your experience as a programmer you have probably run into issues on more than one occasion with having the right version of Python installed or in use. You may have also had issues with one program requiring a particular version of a library and a different program requiring a different version of that same library.

These sorts of issues can be exceptionally frustrating to deal with. Anaconda is a software package that helps deal with these exact issues and while it is not the only option, it has gained a lot of favor in the data science field.

Versions of Anaconda

Anaconda

This is the biggest package. It lets you set up environments which have specific packages and Python versions installed. It also includes around 100 of the most common packages used in data science. It takes up a little more space and you might run into a little more hassle if you need specific versions of those included packages. Anaconda also includes a GUI which can be nice if you are not a big fan of the command line. In general I would probably recommend this route.

Miniconda

Miniconda is the smaller alternative to Anaconda. It lets you still do all the package and Python version management but it does not come with the long list of preinstalled packages. Use this option if you want more control over what packages are installed.

Installing Anaconda or Miniconda

Follow the instructions for the regular installation for your operating system when installing Anaconda or Miniconda. As a side note the link to the download in the Anaconda instructions seems broken. It can be found here Unless you are sure you know what you are doing, I would avoid adding it to the PATH. While it can be very convenient it can be very difficult to debug when things go wrong.

Using Conda

Both Miniconda and Anaconda will install Conda. This tutorial walks you through the basics of creating and managing environments. Be aware that there may be some minor differences between operating systems and how you chose to install Conda. If you did not install Conda in your PATH you will want to do these tutorials via the Anaconda command prompt.

Using the GUI

If you installed Anaconda you can use Anaconda Navigator, the graphical interface to manage Anaconda. Documentation for that can be found here. Your instructor can help with getting issues resolved on any of the above platforms but most demonstrations will likely be based in the command line interface and there are several things that can only be done in the command line interface.

Activity

Having gotten some variety of Conda installed you should make at least two environments. One that is running Python 2.7 and another which is running Python 3.6. To confirm you have this working and are comfortable switching between environments make sure you can run

import sys
print(sys.version)

in both environments and in one case it should print out 2.7 and the other should print out version 3.6. If you are unable to get this to work, seek help on the forums as this will be a potential issue later in the class!