Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In the conda environment list, what does the asterisk mean?

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?

like image 359
algal Avatar asked Jan 12 '18 07:01

algal


People also ask

What is an environment in conda?

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.

What are conda commands?

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.

How do I check my packages in conda environment?

in terminal, type : conda list to obtain the packages installed using conda.


1 Answers

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.

like image 96
emmet02 Avatar answered Nov 15 '22 09:11

emmet02