Conda error upon login

Hi! I am getting the following error from conda upon login. Does anyone know how to fix it?

Thank you.

 support: hpc@unige.ch
-bash: /home/users/s/saini7/anaconda/etc/profile.d/conda.sh: No such file or directory

CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
To initialize your shell, run

    $ conda init <SHELL_NAME>

Currently supported shells are:
  - bash
  - fish
  - tcsh
  - xonsh
  - zsh
  - powershell

See 'conda init --help' for more information and options.

IMPORTANT: You may need to close and restart your shell after running 'conda init'.


-bash: /home/users/s/saini7/anaconda/etc/profile.d/conda.sh: No such file or directory

CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
To initialize your shell, run

    $ conda init <SHELL_NAME>

Currently supported shells are:
  - bash
  - fish
  - tcsh
  - xonsh
  - zsh
  - powershell

See 'conda init --help' for more information and options.

IMPORTANT: You may need to close and restart your shell after running 'conda init'.```

Hi,

this issue is in your profile.

hint:

[root@master.cluster ~]# grep  conda.sh /home/users/s/saini7/.profile
source ~/anaconda3/etc/profile.d/conda.sh

Thanks! Using source resolves the issue temporarily. But I have to do this step every time I log in to the baobab. Any way I can fix the profile so I don’t receive this message?

Thank you in advance for your help.

Hi,

I wanted to let you know the reason why you have this error message, not that you need to type something:)

You have a line in your profile that causes this error.

In .bash_profile you’ve a lot of uneeded lines:

echo "export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8">>~/.bash_profile

this add the three lines to this file each time you login.

In the same file, at line 4356(!) you have this:

. ~/anaconda/etc/profile.d/conda.sh
conda activate

And in your home directory, you don’t have anaconda directory but you do have anaconda3.

You should clean this file and only activate conda in one place : .profile or .bash_profile.

Best