25

I'm learning python and some article tell me that I should use pip, but when I trying to install pip success, it tells me

zsh: command not found: pip

this is my python

➜  ~ git:(master) ✗ which -a python
/usr/bin/python

python version

➜  ~ git:(master) ✗ python --version
Python 3.5.0

User configuration

.zshrc

export PATH="/Library/Frameworks/Python.framework/Versions/3.5/bin:/Users/hedongfang/.rvm/gems/ruby-2.0.0-p643/bin:/Users/hedongfang/.rvm/gems/ruby-2.0.0-p643@global/bin:/Users/hedongfang/.rvm/rubies/ruby-2.0.0-p643/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/hedongfang/.rvm/bin:/System/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages"
export MANPATH="/usr/local/man:$MANPATH"

I'm new in python, so if you want anything else,please tell me.

Kshitij Saraogi
  • 6,821
  • 8
  • 41
  • 71
hexiaoyi
  • 251
  • 1
  • 3
  • 4

1 Answers1

34

If you are in MAC OS X you could try: sudo easy_install pip

pip does not come native with MAC OS.

Aidan Gomez
  • 8,167
  • 5
  • 28
  • 51
Marco
  • 670
  • 5
  • 16
  • I try it just now but sudo: easy: command not found – hexiaoyi Mar 22 '17 at 11:33
  • Sorry, I spelled it bad. Try with `easy_install`. – Marco Mar 22 '17 at 14:49
  • 1
    ➜ ~ git:(master) ✗ sudo easy_install pip Password: File "/usr/bin/easy_install", line 31 continue ^ TabError: inconsistent use of tabs and spaces in indentation I'm sorry I was busy with my job I – hexiaoyi Mar 24 '17 at 11:38
  • 1
    Got error: `Searching for pip Reading http://pypi.python.org/simple/pip/ Couldn't find index page for 'pip' (maybe misspelled?) Scanning index of all packages (this may take a while) Reading http://pypi.python.org/simple/ No local packages or download links found for pip error: Could not find suitable distribution for Requirement.parse('pip')` – meaning-matters Dec 27 '17 at 18:24
  • 4
    `sudo easy_install pip` is broken on newer macOs editions and running pip will crash. – Cyril Duchon-Doris Apr 29 '21 at 11:58
  • 3
    @CyrilDuchon-Doris you're right! try: `pip3` instead, it's supposed to already be installed, try: `pip3 -V` – Nir Alfasi Nov 02 '21 at 21:07
  • 2
    Doesn't work on M1 chip – sam k Feb 09 '22 at 19:59
  • 6
    @samk for me, the best solution in Mac M1: first execute: `curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py` after: `python3 get-pip.py` – Edson Filho May 02 '22 at 19:28