'How can I create an Anaconda env from the env folder?

How can I recreate this environment in Anaconda from this folder? I don't have a yaml. The folder is on an external drive. I had to do an unexpected fresh install of Windows, but luckily had the anaconda3 folder backed up.

enter image description here



Solution 1:[1]

One approach would be to try generating a YAML from the environment:

conda env export -p /path/to/env/gdal > gdal_env.yaml

Then recreate from the YAML:

conda env create -n gdal -f gdal_env.yaml

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 merv