Skip to content

Instantly share code, notes, and snippets.

@OmegaTeee
OmegaTeee / conda-prefix.md
Last active October 13, 2025 00:47
quickstart

Managing environment-specific variables in conda

Using conda's activate.d and deactivate.d directories is the proper way to handle environment-specific library paths. This ensures the environment variables are only set when the conda environment is active and automatically cleaned up when deactivated.

I've implemented the conda-native approach you suggested, which is much more robust and user-friendly:

What's Better About This Approach

  • 🎯 Environment-Specific: Library paths only set when the conda environment is active