Ubuntu – What does “.bashrc or prepend the Anaconda install location” mean

bashbashrccommand linepythonroot

I installed Anaconda from root, after completion of installation this message was displayed on terminal screen:

Python 2.7.8 :: Continuum Analytics, Inc.
creating default environment...
installation finished.
Do you wish the installer to prepend the Anaconda install location to PATH in your /root/.bashrc ? [yes|no]
[no] >>> no

You may wish to edit your .bashrc or prepend the Anaconda install location:

$ export PATH=/usr/bin/anaconda/bin:$PATH

Thank you for installing Anaconda!
root@pkj:~#

What does these three following statements mean?

  1. Do you wish the installer to prepend the Anaconda install location to PATH in your /root/.bashrc ? [yes|no]
  2. You may wish to edit your .bashrc or prepend the Anaconda install location:
  3. $ export PATH=/usr/bin/anaconda/bin:$PATH

I accessed root using: pkj@pkj:~$ sudo su -

Best Answer

  1. Is asking if you want to add Anaconda to your PATH. This basically means that when you type anaconda at the command line interface it knows where to look for it.

  2. Just suggesting you do what 1. recommended or perform the following command so you are able to run anaconda from the command line without first having to go to /opt/anaconda/anaconda.bin (this is just an example as i don't know the actual path.)

  3. This is a way to add the anaconda install directory to your path so you can just type anaconda. Basically an alternative form of one.

  4. Yes i would recommend you execute number three. It won't hurt anything and will likely just make your life easier.

EDIT

Also when you are trying to switch to root you can just issue sudo su no - is needed. Just an fyi it is usually not needed. You might read here for details. Either way no biggie

Related Question