To save a conda environment and re-create it, I use:
# Save the environment
conda env export > my_conda_env.yml
# Re-create the environment
conda env create --file my_conda_env.yml
# Reactivate the environment
conda activate pytorch
I notice that my_conda_env.yml
contains prefix: /home/franck/anaconda3/envs/pytorch
on the last line. What's the point of it?