I've installed python 2.7 in my system and I've installed Anaconda also. Right now, I am using python's anaconda and it works perfect. Unfortunately, I wanted to use anaconda's python to be run using root. The issue is that I was unable to change the python path for root.
If I type "which python
" from terminal , I am able to get this result:
/home/myuser/anaconda/bin/python
If I type "sudo which python
" from terminal, the result is :
/usr/bin/python
I have installed anaconda in a directory accessible by root (changed during installation) and I've already added it's path to /etc/environment
(added /usr/anaconda/bin
to PATH in environment).
How do I change the default python path of root(I use sudo
command to get root privileges)?
I'm using ubuntu 12.04.