Reputation: 22946
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?
Upvotes: 12
Views: 24355
Reputation: 153
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/
Upvotes: 6
Reputation: 3147
easy_install has been deprecated. Use below commands instead.
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py
Upvotes: 4
Reputation: 243
You might have pip3 instead. Use it to upgrade pip.
pip3 install --upgrade pip
Upvotes: 15