conda export environment just packages code example
Example 1: conda export environment
# conda export environment.yml
conda env export > environment.yml
# conda create environment from file (Same environment name)
conda env create -f environment.yml
Example 2: conda create environment without packages
conda create --name myenv python=3.8 --no-default-packages