简体   繁体   中英

bash: pip: command not found mac os high sierra

I can't use pip. I've tried reinstalling pip.

iterm returned:

already installed here: Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg

So I added Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg to my path:

MacBook-Pro:~ user$ export PATH=$PATH:Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg
MacBook-Pro:~ user$ pip
-bash: pip: command not found
MacBook-Pro:~ user$ echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg
MacBook-Pro:~ user$ which pip
MacBook-Pro:~ user$

It doesn't seem to be working, even though i tried installing pip in /usr/bin

这解决了问题:

export PATH="/usr/local/bin:/usr/local/sbin:~/bin:$PATH"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM