How to set specific environment variables when activating conda environment?

Use the files $CONDA_PREFIX/etc/conda/activate.d and $CONDA_PREFIX/etc/conda/deactivate.d, where $CONDA_PREFIX is the path to the environment.

See the section on managing environments in the official documentation for reference.

Leave a Comment