
Now I’ll install pip over itself an you’ll notice that whenever I install the python3 version it overwrites pip: $ sudo python get-pip.py I then ran the following per the instructions on the pypi pip installation page: $ curl -o get-pip.pyġ00 1669k 100 1669k 0 0 3436k 0 -:-:-:-:-:-:- 3442k So I uninstalled all versions of pip by doing the following: sudo apt-get remove python-pip python3-pip -yes Pip 19.1 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7) Pip 19.1 from /usr/local/lib/python3.5/dist-packages/pip (python 3.5)įorcing the pip (pip2) upgrade re-associates pip with python 2.x: $ sudo python -m pip install pip -upgrade -force-reinstall Running the pip3 upgrade breaks pip: $ sudo python3 -m pip install pip -upgrade -force-reinstall I get that we’re trying to get users to migrate away from python 2.x, but there are plenty of people that still (and still will) use python 2.x and have historically been using pip to install python 2.x packages. I think there’s a pretty long-running convention that python -> 2.x and python3 -> 3.x - for that same reason, the convention should hold with pip -> python 2.x and pip3 -> python 3.x - doing otherwise is just confusing. If you run sudo pip3 install pip -update it will update pip3, but it will also update the pip binary and now running pip to install a package will install the package for Python 3.x, not 2.x sudo apt-get install pip) you get pip3 for Python 3.x.

sudo apt-get install python-pip) you get pip for Python 2.x. This can be useful if you do not have permission to change system-wide Python packages.If you install pip (i.e. The -user option is provided to the pip3 command in order to upgrade pip3 for the current user and not other users. The pip3 can be also upgraded for the current user only. $ sudo pip install -upgrade pip3 Upgrade pip3 For Current Users The pip can be upgraded like below which will actually upgrade the “pip3” under the hood. If the Python3 is installed only the pip command refers to the pip3 as well. The pip is an alias to the active version of the Python pip.

$ sudo pip3 install -upgrade pip3 Upgrade pip Keep in mind that pip3 is also a Python package or module like others. Also, the “pip3” is provided as the package we want to upgrade.

The pip3 command is used to upgrade itself like below where the install parameter is specified with the -upgrade option. The pip3 command is created to upgrade 3rd party Python modules but it can also upgrade itself without a problem.
