28

I'm trying to install pip (python installer) to my username since I don't have root privileges and can't just sudo apt-get install python-pip.

So what I've done is just easy_install --user pip. That installs it to .local/bin apparently but then when I call it like so:

pip install --user astropy

It says that pip is not currently installed.

I have limited knowledge of linux and of the system I'm using (NX connection to a machine at my university). I know I should be able to do this!

  • 12
    If easy_install is not available, you can install pip to local with wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py && python get-pip.py --user – JorgeGT Nov 2 '14 at 18:51
  • 16
    Here is the up-to-date version of the above method: wget https://bootstrap.pypa.io/get-pip.py && python get-pip.py --user – qed Nov 22 '16 at 11:49
  • 1
    Get this error: OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/pip' – ablmf Jan 25 '17 at 15:34
  • 1
    @ablmf - did you add the --user when running python get-pip.py --user ? – mchen.ja Jan 26 '17 at 18:26
  • @qed 's comment should be the accepted answer – Cédric Van Rompay Jul 24 '17 at 11:32
21

I hope I'm right and the problem is with your PATH, try this

You can add this to your ~/.bashrc file:

PATH=$PATH:~/.local/bin

If you don't know how, you can just execute this line in a Terminal:

echo "PATH=\$PATH:~/.local/bin" >> ~/.bashrc

You can also check what's in your PATH by typing in the Terminal

echo $PATH
  • 5
    Don't forget to source ~/.bashrc for the change to make effect! – JorgeGT Nov 2 '14 at 18:49

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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