4
votes

I am using conda 4.7.12 and trying to list my environment variables according to the documentation by running conda env config vars list however I get the error

usage: conda-env [-h] {create,export,list,remove,update} ... > conda-env: error: invalid choice: 'config' (choose from 'create', 'export', 'list', 'remove', 'update')

I have a feeling it is because the documentation is pointing to "latest" which is no 4.7 but rather 4.8 (I believe). I can't find the old docs for 4.7 so trying to find a similar command to list environment variables in version 4.7.

1

1 Answers

2
votes

Yes, your hunch is right: it is a v4.8 feature. Previous to this, env-specific environment variables could only be managed through scripts under $PREFIX/conda-meta/{de}activate.d/, so if there are env-specific variables you'd find them there. E.g., try greping around in activate.d/ scripts for ^EXPORT commands.

This is a brand-new feature and I haven't seen it used much yet, so I'd be surprised if it even turned anything up. It's blank for all my envs. I'm not sure that the mechanism for packages to specify env vars through this interface exists yet. For now, I think the only way to use it is to do conda env config vars set.

More generally, there is conda info --system, which lists the system's environment variables.