Do the following steps to export a Conda environment.
- Open Anaconda Prompt and activate the environment you want to migrate.
conda activate <name_of_environment>
- Export the active environment.
conda env export > environment.yml
Import this environment file into a new machine.
- Open up Anaconda Prompt and go to that directory which has environment.yml.
- Create the environment by running:
conda env create -f environment.yml
You need to have Anaconda installed.
- Open Anaconda Prompt and create a new environment with the following command.
conda create --name NewEnv python=3.7.0
- Activate the new environment.
conda activate NewEnv
- Install ipykernel in the new environment.
(NewEnv) $ pip install ipykernel
- Install the new environment to Jupyter Notebook.
python -m ipykernel install --user --name=NewEnv
- Check your new environment in Jupyter Notebook.