12

I followed online instructions on how to install pip on macOS (for example this, this, and this).

I all seems to simple, but it's not working for me.

My python --version is 2.7.10.

When I run sudo easy_install pip I get:

$ sudo easy_install pip Password: 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') 

Any idea how I can fix or work around this?

3
  • 2
    sudo and pip in the same command seem like a bad idea on OSX. I'd rather keep the system-provided Python completely under the OS updater control, and would do any development and pip-based installation in a virtualenv and/or on a brew-installed Python. Commented Dec 27, 2017 at 18:55
  • @9000 Thanks for the advice. I'm new to Python. I did install brew during my attempts. How do I keep things under brew? Commented Dec 27, 2017 at 18:59
  • 1
    Just use pip install instead of sudo pip install. When in doubt, use /usr/bin/pip. Better yet, brew install virtualenv, create a separate environment for each project, and install project-specific dependencies. This way projects never conflict with each other. Commented Dec 27, 2017 at 19:50

3 Answers 3

15

You might have pip3 instead. Use it to upgrade pip.

pip3 install --upgrade pip 
Sign up to request clarification or add additional context in comments.

2 Comments

Even pip3 has the same issue.
after a day of headaches, worked like charm :)
6

Use brew for Macs

brew install python

this will come with pip and both python2 and python3

instructions to bypass 2 python versions (if you want) are at https://pip.readthedocs.io/en/stable/installing/

otherwise, it'll just be "python3 <'program'>"

Here's how to install brew: https://www.howtogeek.com/211541/homebrew-for-os-x-easily-installs-desktop-apps-and-terminal-utilities/

2 Comments

Tried that, but pip is still missing
Just try pip3 instead of pip. You can also use an alias of pip3 to pip using bash.
4

easy_install has been deprecated. Use below commands instead.

  1. curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

  2. python get-pip.py

Source

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.