4

I have installed pip in my ~/.local/bin/ directory.

Here are the outputs of which, type and $PATH

$ type pip
pip is hashed (/home/bcc/pedros/.local/bin/pip)
$ which pip
/usr/bin/pip
$ echo $PATH
~/.local/bin/:~/bin:~/.bin:/global/bin:/opt/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

I can't figure out what's wrong with my PATH. This is affecting other installations in my Linux as well.

My Linux:

Distributor ID: Debian
Description:    Debian GNU/Linux 6.0.7 (squeeze)
Jeff Schaller
  • 67,283
  • 35
  • 116
  • 255
pedros
  • 185

1 Answers1

4

~ is not good to use in PATH. use $HOME instead. It may fix your issue (though bash does accept ~). Also check your permissions on pip

Baba
  • 3,279
coteyr
  • 4,310
  • Thanks a lot, this worked! Now 'which' returns the right path. – pedros Aug 27 '14 at 14:14
  • Altought reading the related question on the comment above, I think the problem was only in the command which, not in the PATH. Not sure tho – pedros Aug 27 '14 at 14:17
  • 1
    ~ is a expansion "macro" it's not always evaluated. That's why it's better to use $HOME. It's evaluated more frequently/differently. – coteyr Aug 27 '14 at 14:20
  • Yup, tested another installation that was failing before and now it worked, thanks for the help. – pedros Aug 27 '14 at 14:22