install anaconda without losing environments code example
Example 1: conda create environment based on requirements.txt
# using pip
pip install -r requirements.txt
# using Conda
conda create --name <env_name> --file requirements.txt
Example 2: how to make a conda environment
conda create --name myenv
#to activate environment:
conda activate myenv