To upgrade pip on Mac, type the python3 -m pip install –upgrade pip. You can also use the pip install –upgrade pip command if you use a virtual environment created by virtualenv or pyvenv.
MacOS X’s latest version with Python version 3, then pip is already installed. If pip is not installed or upgraded on your machine, you can use the following steps.
Type the following commands one by one.
$ xcode-select --install
# if pip not installed
$ sudo easy_install pip
# show current pip version
$ pip --version
# upgrade pip
$ python -m pip install --upgrade pip
My current Pip version is the following.
pip --version
pip 20.0.2 from /usr/local/lib/python3.8/site-packages/pip (python 3.8)
How to upgrade pip on Linux
First, check the version of Python.
pip --version
If your version is old, you need to upgrade the pip.
To upgrade pip on Linux, type the following command.
pip install -U pip
The above command will update your pip version.
How to upgrade pip on Windows
To upgrade PIP in Windows, open the Windows Command Prompt(CMD) and type the python -m pip install -U pip. Note that the following would only work if you added Python to your Windows path.
If you have the older version of pip, then then, upgrade the pip.
To upgrade pip on Windows, type the following command.
python -m pip install -U pip
That’s it.