Creating the conda environment
Now that we have set up Anaconda, let's use conda to create a Python virtual environment, which we will use throughout this book.
praveen@ubuntu:~/HOIAWOG$ conda create -f conda_env.yaml -n rl_gym_book
At this point, we will just create a new minimal environment to proceed. Enter the following command in a Terminal:
praveen@ubuntu:~$conda create --name rl_gym_book python=3.5
This will create a conda environment named rl_gym_book with a Python3 interpreter. It will print some information about what is going to be downloaded and the packages that will be installed. You may be prompted with a yes/no question as to whether you want to proceed. Type y and hit Enter. Once the environment creation process is complete, you can activate that environment using the following command:
praveen@ubuntu:~$source activate rl_gym_book
You will now see your command prompt's prefix changing to look something like this, to signify that you are inside the rl_gym_book virtual environment:
(rl_gym_book) praveen@ubuntu:~$
You can use this as an indicator as you progress through the chapters to know when commands have to be entered inside this environment and when commands can be entered outside the environment. To exit or deactivate the environment, you can simply type this:
praveen@ubuntu:~$source deactivate