conda env can be activated from anywhere code example
Example 1: conda create environment based on requirements.txt
pip freeze > requirements.txt
Example 2: conda activate virtual environment
conda activate env-name
pip freeze > requirements.txt
conda activate env-name