I spent most of the day yesterday searching for a clear answer for installing pip
(package manager for Python). I can't find a good solution.
How do I install it?
Checking for pip on OS X The output of pip --version tells you which version of pip is currently installed, and which version of Python it's set up to install packages for. This is especially helpful if you have more than one version of Python installed on your system.
Usually, pip is automatically installed if you are: working in a virtual environment. using Python downloaded from python.org. using Python that has not been modified by a redistributor to remove ensurepip.
pip's documentation lists the supported mechanisms to install it: https://pip.pypa.io/en/stable/installation/#supported-methods
It is generally recommended to avoid installing pip on the OS-provided python
commands, and to install Python via the https://python.org installers or using something like Homebrew or pyenv.
Python 3.4+ will have ensurepip
, so if you're unable to run python3 -m pip
-- run python3 -m ensurepip
and it'll install pip for you.
If you're using an end-of-life version of Python, you can use get-pip.py
instead.
Old answer (outdated, and results in a broken installation)
easy_install pip
If you need admin privileges to run this, try:
sudo easy_install pip
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With