Introduction to Anaconda

Anaconda Environment Setup

This guide walks through the installation and configuration process for an Anaconda environment. This guide includes the following:

  • Download and installation of Anaconda distribution for Python 3
  • Configuration of Anaconda dev virtual environment
  • Activation of Anaconda dev environment
  • Installation of JupyterLab
  • VERY IMPORTANT: Anaconda downloads the Python 3.8 distribution by default, howeverwe will create and use a virtual environment that utilizes Python 3.7 instead, as many of our activities are not yet compatible with the new Python 3.8 version. It is imperative that you create the virtual environment as indicated and activate it prior to running your code.

Download and Install Anaconda

Navigate to the Anaconda installation documentation. It will be valuable to have the documentation available in case any issues arise.

Navigate to the Anaconda download site, which can be found here. Click the download button as seen in the below image:

This will automatically move your screen to to the download section of the page. Select the appropriate distribution for your system.

You will be asked to save the installer. Save it. After the download is complete, run the download file. This will launch an installation wizard that will walk you through the Anaconda install. Continue through the installation process by clicking either “I Agree” or “Next.”

You will eventually get to a screen that asks if you would like to set your PATH environment variable using the installation wizard. Do NOT check this box. Make sure that both boxes are unchecked, as displayed in the below screenshot. Click install.

  • Click Finish once the installation is complete.

Next, open the terminal (Mac) or Git Bash (Windows).

  • Mac users can find the terminal by opening their Spotlight Search and typing Terminal.
  • Windows users can open Git Bash by locating it in their Start Menu:

Now we will enable the terminal commands. The instructions differ by your operating system.

  • Windows: In your terminal, run the command conda init bash. Then close your terminal, and start a new one.
  • Mac: If you’re running an OS version earlier than 10.15 OR running version 10.15 with a bash terminal environment, type conda init bash. If you’re running versions 10.15 (Catalina) or later AND running the zsh environment, type conda init zsh. Then close your terminal, and start a new one.

Execute the following commands to ensure the latest Anaconda packages are installed. When prompted, enter “y” to proceed.

conda update conda

conda update anaconda

Create a dev environment. When prompted, enter “y” to proceed.

conda create -n dev python=3.7 anaconda 

Activate the dev environment.

conda activate dev

Verify your your installations by executing the conda list command after activating the environment, then locating the following packages in the populated list:

  • Numpy
  • Pandas
  • Matplotlib

DON’T FORGET: Anaconda downloads the Python 3.8 distribution by default, however – many of our activities are not yet compatible with the new Python 3.8 version. It is therefor imperative that you create the virtual environment as indicated using the python=3.7 parameter and activate it prior to running your code. The command to activate your virtual environment is conda activate dev.

We will be happy to hear your thoughts

Leave a reply