I am learning about conda and I am trying to verify I understand the notion of the "active" environment as opposed to ... something else I don't understand.
In particular, conda env list
or conda info -e
will list environments and always seems to put an asterisk next to one of them, like here where it puts it by the "base" environment:
$ conda info -e
# conda environments:
#
base * /Users/alexis/miniconda3
mynotebook /Users/alexis/miniconda3/envs/mynotebook
But this does not mean the base environment is currently active, as I can see by doing conda info
:
$ conda info | head -3
active environment : None
shell level : 0
So if the asterisk does not indicate the active environment, what does it indicate?
A conda environment is a directory that contains a specific collection of conda packages that you have installed. For example, you may have one environment with NumPy 1.7 and its dependencies, and another environment with NumPy 1.6 for legacy testing.
The conda command is the primary interface for managing installations of various packages. It can: Query and search the Anaconda package index and current Anaconda installation.
in terminal, type : conda list to obtain the packages installed using conda.
You are very close to having the full understanding. The * does indeed mean the active environment, which in the absence of specifically activated environment is the base.
Consider the following
$ conda info -e
# conda environments:
#
base * /Users/alexis/miniconda3
mynotebook /Users/alexis/miniconda3/envs/mynotebook
$ conda install pandas
Without activating a conda environment, the base is active in this instance, and pandas will be added to the base 'environment'.
Whereas
$ conda activate mynotebook
(mynotebook)$ conda info -e
# conda environments:
#
base /Users/alexis/miniconda3
mynotebook * /Users/alexis/miniconda3/envs/mynotebook
(mynotebook)$ conda install pandas
Will install into the specific environment that is activated.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With