Environments#

An environment is a directory that contains a specific collection of packages that you have installed. These environments allow you to operate in separate, isolated workspaces, ensuring that packages within one environment remain independent and unaffected by those in another. Learn more about environments from conda’s Environments topic. Find a more extensive list of capabilities in conda’s Managing environments topic.

Sharing an environment#

You can share an environment directly on Anaconda.org or through a command line interface (CLI).

Tip

More of a visual learner? Watch the Sharing an environment video on Anaconda Learning for a walkthrough on sharing environments.

Sharing an environment on Anaconda.org#

  1. If necessary, create and save an environment. See the conda user guide for help creating an environment.

  2. Open a terminal (Anaconda Prompt for Windows users) and run the following command:

    # Replace <MY_ENVIRONMENT> with the name of your environment
    conda env export -n <MY_ENVIRONMENT> -f <MY_ENVIRONMENT>.yml
    
  3. Go to https://anaconda.org/<USERNAME>/environments, where <USERNAME> is your username.

  4. In the top-right corner, click Upload to upload your environment.

Sharing an environment in the CLI#

  1. Create and save an environment. Consult the conda user guide for guidance.

  2. Open a terminal (Anaconda Prompt for Windows users) and run the following command:

    # Replace <MY_ENVIRONMENT> with the name of your environment
    conda env export -n <MY_ENVIRONMENT> -f <MY_ENVIRONMENT>.yml
    
  3. Upload the environment to Anaconda.org by running the following command in the terminal (Anaconda Prompt for Windows users):

    # Replace <MY_ENVIRONMENT> with the name of your environment
    anaconda upload <MY_ENVIRONMENT>.yml
    

Viewing your environment#

You can see a list of your uploaded environments by clicking View at the top of the page and selecting Environments from the dropdown menu.

Downloading your environment#

Anyone with network access can download and install your environment directly from Anaconda.org or through a command line interface (CLI).

Downloading your environment on Anaconda.org#

  1. Go to https://anaconda.org/<USERNAME>/environments, where <USERNAME> is your username.

  2. Select the environment you want to download.

  3. Navigate to the Files tab, then click the file name in the Name column to download it.

Downloading your environment in the CLI#

Open the terminal (Anaconda Prompt for Windows users) and run the following command:

# Replace <MY_ENVIRONMENT> with the name of your environment
conda env create user/<MY_ENVIRONMENT>
source activate <MY_ENVIRONMENT>