吕廷博
吕廷博

Reputation: 56

How to replace conda root environment with another environment?

lvtingbo@ubuntu:~$ conda env list
# conda environments:
#
py3.6                    /home/lvtingbo/anaconda3/envs/py3.6
root                  *  /home/lvtingbo/anaconda3

There are two Conda python environments in my Linux, one is root (the default env), another is py3.6. Now I want to delete root env and replace it with env py3.6 because I will never use root anymore. How can I realize it?

Upvotes: 0

Views: 3523

Answers (1)

Eric C.
Eric C.

Reputation: 3368

I do not think you can delete the root environment because this is where all packages are downloaded and it is the main path of the anaconda you installed.
What you can do, however, is source activate py3.6 in your bashrc file right under the export line of your anaconda3 path.

So in your .bashrc file you should have:

# added by Anaconda3 installer
export PATH="/home/lvtingbo/anaconda3/bin:$PATH"
source activate py3.6

This will load your environment everytime you start a terminal.

Upvotes: 1

Related Questions