chicagobeast12
chicagobeast12

Reputation: 695

How to view conda config paths?

I was running some tests and ran the line below not realizing this was a global action.

conda env config vars set <my_var>=<value>

I continued to use this moving forward:

conda env config vars set <my_var>=<value> -n <name of my env>

But now I can't unset the variable I accidently set globally and it's becoming the default for the rest of my environments. In ./envs/conda-meta/state, I can view all of the environment configurations I've set for that environment. Is there an equivalent to this for your base (default) environment? I'm just looking for the file where it gets saved to so I can remove the config, but the Conda documentation doesn't tell me this.

Upvotes: 0

Views: 210

Answers (1)

merv
merv

Reputation: 76950

The base environment also should have a conda-meta/state. But you can also use the unset subcommand:

Documentation

$ conda env config vars -h
usage: conda-env config vars [-h] {list,set,unset} ...

Interact with environment variables associated with Conda environments

Options:

positional arguments:
  {list,set,unset}
    list            List environment variables for a conda environment
    set             Set environment variables for a conda environment
    unset           Unset environment variables for a conda environment

optional arguments:
  -h, --help        Show this help message and exit.

examples:
    conda env config vars list -n my_env
    conda env config vars set MY_VAR=something OTHER_THING=ohhhhya
    conda env config vars unset MY_VAR

Usage

That is, doing something like

conda env config vars unset <my_var> -n base

would be far preferable than manually editing the conda-meta/state file.

Upvotes: 1

Related Questions