Home > other >  When I activate a conda environment, username and current directory disappear in the terminal
When I activate a conda environment, username and current directory disappear in the terminal

Time:10-03

I am working remotely on my university's cluster. I have created two new conda environments: lammps-old and lammps-new. When I activate any environmet of them the username and current directory indicator disappear. Now they also disappeared in the base environment.

I have tried cutomizing the PS1 in the ~/.bashrc and ~/.bash_profile using:

export PS1='($CONDA_DEFAULT_ENV) [$LOGNAME@$HOSTNAME($SLURM_STEP_NODELIST) $PWD]$ '

But this only solves the problem for the base environment.

I would appreciate any help.

CodePudding user response:

You can set changeps1: False in .condarc

https://conda.io/projects/conda/en/latest/user-guide/configuration/use-condarc.html#change-command-prompt-changeps1

  • Related