Two python distributions, sudo picking the wrong one
Posted
by
DHK
on Ask Ubuntu
See other posts from Ask Ubuntu
or by DHK
Published on 2014-06-07T07:57:16Z
Indexed on
2014/06/07
9:37 UTC
Read the original article
Hit count: 1199
I'm back to Linux after an over 10 year abstinence (fool me thinks). And a little rusty in the sys admin department.
I'm faced with an issue with my python distribution. I'm using Python 2.7, but based on the Anaconda flavour. I followed the standard guidance but recently I discovered an issue that I'm not sure how to fix.
Under sudo, the standard Python as comes with Ubuntu is provided. Under my user account python points to the Anaconda version:
dhk@localhost:~/home/$which python
/opt/anaconda/bin/python
dhk@localhost:~/home/$sudo which python
/usr/bin/python
This is an issue as using sudo pip [anything] usually acts on the wrong directory, yet I cannot use it without sudo.
© Ask Ubuntu or respective owner