(I understand that this does not apply to all projects - sometimes the entire reason for using environment variables is to prevent that particular configuration getting stored in version control.) ![]() Generally you'd want to store only the environment.yml file in version control. The accepted answer ( conda/activate.d and conda/deactivate.d) works well enough, but it is inconvenient if you want the environment variables to be version controlled without putting the entire environment into version control too. Which would set up the environment variables MY_VAR and OTHER_VAR to be set and unset on environment activation and deactivation, respectively. YAML SpecificationĪdded in Conda v4.9, there is now support for automatic defining of environment-specific variables as part of an environment YAML definition. Perhaps a bit verbose, but it avoids having to manually manage files in etc/conda/(de|)activate.d. h, -help Show this help message and exit.Ĭonda env config vars set MY_VAR=something OTHER_THING=ohhhhya Unset Unset environment variables for a conda environment Set Set environment variables for a conda environment ![]() List List environment variables for a conda environment Interact with environment variables associated with Conda environments The command is conda env config vars and here is the help description as of v4.8.3 for the command overall: $ conda env config vars -h Environment Variables as Configuration SettingsĬonda v4.8 introduced a new command-line interface in the conda-env tool for managing environment variables on a per-environment basis.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |