Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing pip on macOS does not work (anymore)

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?

like image 691
meaning-matters Avatar asked Dec 27 '17 18:12

meaning-matters


People also ask

Why pip is not working in Mac?

Sometimes when you are installing packages, you might face the error: pip: command not found . This error could be due to the following reasons: Pip is not installed. Pip is installed, but it is not compatible with the current environment.

Why is my pip install not working?

A “pip: command not found” error occurs when you fail to properly install the package installer for Python (pip) needed to run Python on your computer. To fix it, you will either need to re-install Python and check the box to add Python to your PATH or install pip on your command line.

Why can't I install pip Python?

This error usually means there's a problem with the Python installation or the system variable PATH is not set up correctly. Try reinstalling Python and all its components to fix the problem. The easiest way is via the Python executable installer.


2 Answers

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

pip3 install --upgrade pip
like image 84
Phillip Havea Avatar answered Sep 30 '22 02:09

Phillip Havea


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

like image 23
akshaynagpal Avatar answered Sep 30 '22 01:09

akshaynagpal