1

My anaconda base works fine and points to the correct anaconda path but creating and switching to a new environment points to the system python path. Have tried uninstalling and reinstalling including deleting all lines in bashrc.

(base) morgan@lambda3:~$ which python
/home/morgan/anaconda3/bin/python
(base) morgan@lambda3:~$ conda activate dcg
(dcg) morgan@lambda3:~$ which python
/usr/bin/python

Here is my path variable also:

(base) morgan@lambda3:~$ echo $PATH
/home/morgan/anaconda3/bin:/home/morgan/anaconda3/condabin:/usr/local/sbin:/usr/local/bin:/
usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

EDIT:

Here is output of "which conda" which seems to change when activating the new env.

(base) morgan@lambda3:~$ which conda
/home/morgan/anaconda3/bin/conda
(base) morgan@lambda3:~$ conda activate dcg
(dcg) morgan@lambda3:~$ which conda
/home/morgan/anaconda3/condabin/conda

also found this thread which only offers a workaround: python conda: created a environment, but it is not using conda's python

EDIT:

It seems that my environments aren't actually being created in any meaningful way as they should be:

(base) morgan@lambda3:~/anaconda3/envs$ tree
.
└── dcg
    └── conda-meta
        └── history

2 directories, 1 file
mkohler
  • 139
  • 5

1 Answers1

2

Conda package was not getting created correctly as I was not specifying "python" when creating it:

conda create --name dcg python

Or, for a specific version:

conda create --name dcg python=<version>

Originally found the answer here: Anaconda is not creating full environment

After wondering why someone would create an empty environment, I learned that Conda can be used for other languages and such which is why python isn't always included if not specified: Why would I create a Conda env without an interpreter?

mkohler
  • 139
  • 5