setting up a conda environment#
Note
This page provides instructions for creating a new conda environment using Anaconda Navigator, or using the Anaconda Command Prompt.
You only need to choose ONE of these methods for setting up the environment.
Danger
You should have already opened a GitHub account, installed git and GitHub Desktop, forked the workshop repository, cloned the repository to your computer, and installed Anaconda Navigator.
If you haven’t done all of these steps, please do so now before continuing.
anaconda command prompt#
From the Start menu, open the Anaconda Command Prompt:
When you open the command prompt, you should see (base)
next to the prompt:
(base) C:\Users\bob>
Warning
The Anaconda Command Prompt automatically loads conda so that you can use it; if you don’t see (base)
,
it likely means that you have opened the normal Command Prompt, and so you will see the following error when
you try to run a command with conda:
Next, navigate to where you have cloned the repository using cd
:
cd c:\Users\bob\intro-to-r
If you’re in the right place, you should see all of the files from the repository when you enter the dir
command.
Now, enter the following command:
conda env create -f environment.yml
This tells conda to create a new environment, using the “recipe” provided in environment.yml
.
This step may take some time1, but if all goes well, you will eventually see the following message:
And that’s it. Once you have done this, you may want to open Anaconda Navigator and set up a new command
prompt link for your environment, following the instructions in setting up the command prompt.
Once you have the conda environment set up, you are ready to move on to configuring JupyterLab.