Setting up a virtual environment in Anaconda

A virtual environment allows us to have different versions of libraries and executables, avoiding conflicts between them and making it easy to develop multiple projects at the same time. Creating a virtual environment in Anaconda is easy and only requires executing a single command on Anaconda's CLI. With the following command, we are going to create a virtual environment running Python 3.5 and name it deeplearning:

conda create -n deeplearning pip python=3.5

Now that we have created the deeplearning virtual environment, we are going to activate it so that we can start populating it with Python packages. To do so, open Anaconda's CLI and type the following command:

activate deeplearning

After typing this command, your CLI prompt should change and include a prefix to indicate that the virtual environment is currently active.