Migrate a Conda Environment

Do the following steps to export a Conda environment.

  1. Open Anaconda Prompt and activate the environment you want to migrate.
    conda activate <name_of_environment>
  2. Export the active environment.
    conda env export > environment.yml

Import this environment file into a new machine.

  1. Open up Anaconda Prompt and go to that directory which has environment.yml.
  2. Create the environment by running:
    conda env create -f environment.yml