Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I install Python's pip3 on my Mac?

People also ask

How do I know if pip3 is installed on my Mac?

Installing pip on OS X After the program runs, use the command pip --version (or pip3 --version ) to make sure pip was installed correctly.

How do I download and install pip3?

Download the 64-bit installer for python 3.6. 5 by clicking here or visit the windows releases page for other versions. The latest python3 installers for Windows install pip3 automatically but make sure that you have clicked the checkbox “Add Python 3.

Does Python 3 have pip3?

pip3 is the official package manager and pip command for Python 3. It enables the installation and management of third party software packages with features and functionality not found in the Python standard library. Pip3 installs packages from PyPI (Python Package Index).


UPDATED - Homebrew version after 1.5

According to the official Homebrew page:

On 1st March 2018 the python formula will be upgraded to Python 3.x and a python@2 formula will be added for installing Python 2.7 (although this will be keg-only so neither python nor python2 will be added to the PATH by default without a manual brew link --force). We will maintain python2, python3 and python@3 aliases.

So to install Python 3, run the following command:

brew install python3

Then, the pip or pip3 is installed automatically, and you can install any package by pip install <package>.


The older version of Homebrew

Not only brew install python3 but also brew postinstall python3

So you must run:

brew install python3
brew postinstall python3

Note that you should check the console, as it might get you errors and in that case, the pip3 is not installed.


You could use Homebrew.

Then just run:

brew install python3

I solved the same problem with these commands:

curl -O https://bootstrap.pypa.io/get-pip.py
sudo python3 get-pip.py

For me brew postinstall python3 didn't work. I found this solution on the GitHub Homebrew issues page:

$ brew rm python
$ rm -rf /usr/local/opt/python
$ brew cleanup
$ brew install python3

Python 3 was working successfully, but without pip3. I tried advice from Stack Overflow, Quora and others (numerous installs and uninstalls).

Python 3 was always fine, but without pip3. Finally I downloaded Python3 from: https://www.python.org/downloads/

By simple mouse clicks and everything (Python 3 + pip3), it is working fine now.


To install or upgrade pip, download get-pip.py from the official site. Then run the following command:

sudo python get-pip.py 

and it will install pip for your python version which runs the script.