0

I am using ubuntu terminal in tcsh shell. Since there are no memory, I uninstal anaconda by rm -rf it in one director, which is '/glade/u/home/lixujin/anaconda3'. And then I install it in another directory, which is '/glade/work/lixujin/anaconda3'.

After I follow the instruction to install it, I test it by type conda list. Then I get information like this /glade/u/home/lixujin/anaconda3/etc/profile.d/conda.csh: No such file or directory. , which is my old install directory.

So, I guess there still are some environment variables I need to change. But I don't where I should modify.

I am searching for a long time on net. But no use. Please help or try to give some ideas how to achieve this.

Any suggestions?

lixu jin
  • 25
  • 7
  • follow complete instruction for downloading conda in ubuntu. https://github.com/Nitish1206/conda_setup_for_ubuntu you might be missing source ~/.bashrc – Nitish Jha Jan 20 '20 at 12:12

2 Answers2

0

try this

export PATH=~/anaconda3/bin:$PATH

if you still had a problem open the file .bashrc (hidden file), located in the home directory, runs codes every time a new terminal is opened. and then add it

export PATH=~/anaconda3/bin:$PATH
dhentris
  • 198
  • 1
  • 2
  • 10
  • I use a tcsh shell. And I have already added `setenv PATH "/glade/u/home/lixujin/work/anaconda3/bin:$PATH"` in .cshrc. But it still doesn't work. – lixu jin Oct 02 '19 at 23:29
0

conda need to be initialized in the shell init script, ~/.tcshrc for tcsh.

  1. Add /glade/work/lixujin/anaconda3/condabin into your PATH. (I mean anaconda3/condabin but not anaconda3/bin.)

  2. Open a new interactive tcsh shell, run conda init.

After above commands, conda will write init script into your .tcshrc and codna will work properly.

Caveat

Add /path/to/anaconda3/condabin but not bin into PATH. That's a big change introduced in conda 4.6.

Activation script initialization fron conda 4.6 release log

Conda 4.6 adds extensive initialization support so that more shells than ever before can use the new conda activate command. For more information, read the output from conda init –help We’re especially excited about this new way of working, because removing the need to modify PATH makes Conda much less disruptive to other software on your system.

In the old days, when the conda-installation/bin directory is added into PATH, the default Python environment from "base" is activated by default. After conda 4.6, conda related commands are separated into condabin, which makes it possible to expose conda command only without activating the Python from "base" environment.

References

Simba
  • 23,537
  • 7
  • 64
  • 76
  • @lixujin Read my answer carefully. I mean `anaconda3/condabin` but not `anaconda/bin`. After that, there's another step to be done. – Simba Oct 02 '19 at 23:57