0

When I ssh to a server I always use, the prompt only shows 'base':

(base)

And thats it, not even a $ sign or directory/username. I understand the base refers to the base conda environment but Im not sure why nothing else is shown. How can I get other info shown there?:

(<conda environment>) [<username>@<server name> <directory>] $

Thanks!

2
  • What is your login shell on the server? In which startup file is the conda environment activated? Oct 18, 2022 at 23:51
  • Its bash, I dont activate any conda environment unless I need it specifically. Oct 18, 2022 at 23:56

2 Answers 2

1

When you log in, this:

base

is shown because the conda environment is being activated automatically. Other information is being overriden at the moment. Try setting it so that it does not activate automatically -- that might solve your problem.

In the home directory, create a file ~/.condarc . And add this line to the file with your favourite editor:

auto_activate_base: false

Log out and log back in. (base) should disappear. Now, activate an environment -- I think you should get what you desire, which is:

 (<conda environment>) [<username>@<server name> <directory>] $
3
  • It worked only once. Once I quit the terminal and re-launch it, ssh and activate an environment, only the (base) part is shown again Oct 19, 2022 at 3:13
  • You're creating this ~/.condarc file on the server, right? Sorry if I wasn't clear -- it should be on the server and not the client. If you change accounts while connected (i.e., let's say you sudo while you connect to the server), you'll have to create the same ~/.condarc in that root user's home directory.
    – Ray
    Oct 19, 2022 at 14:29
  • Regarding your comment above, auto_activate_base is true by default. So, the base conda environment is auto-activating (as the name implies) by default unless you explicitly switch it off...
    – Ray
    Oct 19, 2022 at 14:30
1

Had same issue as OP.

I feel like the answer and comments above in fact do not really answer the question. OP does not appear to be annoyed about that the environment name is preprended to the prompt. Merely that it's the only information there.

For me this command helped:

conda init bash

... followed by restarting bash or logging in / out.

(source: https://github.com/conda/conda/issues/11885)

Hope this helps.

You must log in to answer this question.

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