conda open environment 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: conda activate env
conda activate myenv
Example 3: activate conda with source
#!/bin/bash
source /Users/yourname/anaconda/bin/activate your_env
python --version # example way to see that your virtual env loaded as expected