0

Newly assigned server uses csh shell, I have never used csh before.

I tried to path to anaconda/bin in the .cshrc

but if I query which python it still returns usr/bin/python

It does not even work temporarily. I tried appending path to anaconda/bin using set path=($path /path/to/anaconda/bin), and after this $PATH indeed shows path to anaconda/bin but if I run which python answer is still /usr/bin/python

I am never going to use the default python that came with the Ubuntu, so rather than a temporary, I am more interested in a permanent solution. I added the anaconda path to the .cshrc, it populated correctly after I started a new session , but no success with starting anaconda python.

I do not want to go through the pain of cding to the anaconda/bin directory every time to start the python.

2
  • 1
    "I tried appending path" You need to add it to the front of the path not the end ... – DavidPostill Feb 14 '18 at 20:45
  • @DavidPostill, that was very dumb of me, please write it as an answer and I'll accept. – Adorn Feb 15 '18 at 2:31
3

I tried appending path to anaconda/bin using set path=($path /path/to/anaconda/bin)

The path is searched from left to right.

You need to add it to the front of the path not the end so csh finds Anaconda python before \usr\bin\python:

set path=(/path/to/anaconda/bin $path)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.