3

I am running a new installed Ubuntu 19.04 Disco Dingo on a dual boot with windows 10. I installed Anaconda for Ubuntu using this guide https://docs.anaconda.com/anaconda/install/linux/

Finishing the installation the next time I open the terminal, it appears to be like

(base) username@ubuntu:~$

which means I am in the main environment of Conda. But, when installation of Anaconda finishes, it says:

if you want conda not to activate automatically when startup, run:
    conda config --set auto_activate_base false

But when I do it, and when I am out of the (base), the next time that I open the terminal and try to normally open Anaconda Navigator by anaconda-navigator it says that anaconda-navigator: command not found.

But on it was not like this before. Can someone describe me how can I remove this (base) and also be able to run anaconda commands like opening jupyter notebook directly from normal terminal.

I appreciate your answers.

1

4 Answers 4

3

So no one answered and I needed to solve it so went through the websites and found the solution which I share for the future users' problem.

The thing to do is to modify two things in .condarc file, which usually is situated saved in home directory.

First to set the automatic activation of the base to true, to have the environment activated in the terminal, and change changeps1 to False in order to prevent to show (base) in the beginning:

$ conda config --set auto_activate_base True
$ conda config --set changeps1 False

They are all saved in .condarc file.

0

If you turn off the automatic activation of the conda environment in the terminal, the next time you'll try to use navigator you must use the conda activate <name of the environment> command. This works for me.

0

If you have anaconda installed in your machine, the python in the conda environment is activated in your machine by default. Sometimes, you might want to use the default python environment in your machine then you can run conda config --set auto_activate_base false.

When using the default python environment, you will be unable to open jupyter notebook nor anaconda-navigator through the terminal except you run conda activate <name of conda environment>. In my case, it is conda activate root. What this does is to temporarily allow you to activate a chosen conda environment thereby solving the problem.

I personally prefer using my default python environment on my machine because pasting copied codes (which require python activity) from the internet will not work until you take the pain to adjust the copied code for the conda environment which is the default.

0

A simple desktop launcher for anaconda-navigator is a file that includes these 3 lines:

#!/bin/bash
source /home/<user>/anaconda3/bin/activate
anaconda-navigator

Or if you'd like to access Spyder (or any other program):

#!/bin/bash
source /home/<user>/anaconda3/bin/activate
spyder

Conda activator is disabled (that is: conda config --set auto_activate_base False) initially. I don't like if (base) is constantly written in my terminal.

The icon is somewhere in the anaconda3 directory, look it up if you'd like to have a smooth desktop :)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .