I usually just run the following commands to upgrade both pip2 (=pip by default) and pip3:

sudo -H pip3 install --upgrade pip
sudo -H pip2 install --upgrade pip

You must make sure that you upgrade the version (for Python 2 or 3), which you want to react on the command pip without number, last.

Also please note that this keeps the old packaged versions installed through apt-get or any other package manager, but adds new versions which have nothing to do with the system packages. The pip-installed packages will be preferred, but you should not remove the apt-get-installed ones either, because the package manager can't know that any pip version is installed otherwise.

Answer from Byte Commander on askubuntu.com
Discussions

How to update Python with pip or Terminal on Linux?
You really shouldn't do that with your system install of Python. Either update the entire system or install a second copy of Python somehow. It's perfectly fine to use 3.8 for learning though. More on reddit.com
🌐 r/learnpython
9
2
March 28, 2021
python - How do I update/upgrade pip itself from inside my virtual environment? - Stack Overflow
I'm able to update pip-managed packages, but how do I update pip itself? According to pip --version, I currently have pip 1.1 installed in my virtualenv and I want to update to the latest version. ... More on stackoverflow.com
🌐 stackoverflow.com
You can't use pip on Ubuntu 23.04 anymore
You can always install a separate version of Python if you want to use pip globally without a virtualenv. Installing to the system Python's site-packages was always a bad idea because of conflicts with apt packages. More on reddit.com
🌐 r/Python
232
520
April 29, 2023
How to change Python and Pip version in Ubuntu
You shouldn’t tamper with the system installation of python and there really isn’t a way to “change the defaults” globally. You should look into virtual environments: https://docs.python.org/3/library/venv.html In short, create a virtual environment based on the global 3.9 installation and once activated it would point python to python3.9 for you until you deactivate it. More on reddit.com
🌐 r/bashonubuntuonwindows
11
14
January 17, 2021
🌐
DataCamp
datacamp.com › tutorial › pip-upgrade-python
How to Upgrade Pip and Python in Windows, MacOS, and Linux | DataCamp
December 23, 2025 - For Linux users, the upgrade process may vary slightly depending on the distribution, such as Ubuntu or Fedora. The first step is to update the package list. You can do this by opening your terminal and running the following command: ... You can then upgrade Python by installing the latest version. Open your terminal and run the following command: ... The next step is to upgrade Pip.
🌐
GeeksforGeeks
geeksforgeeks.org › python › how-to-upgrade-pip-and-python-on-windows-linux-and-macos
How to Upgrade Pip and Python on Windows, Linux, and MacOS? - GeeksforGeeks
January 30, 2026 - Specify the Python version you want to install, such as Python 3.10: ... Replace python310 with your desired Python version. ... To update and upgrade Pip on a Linux system, you can use the 'pip' tool itself to update to the latest version.
🌐
Flexiple
flexiple.com › python › pip-upgrade
Pip Upgrade – And How to Update Pip and Python - Flexiple
March 4, 2024 - Type the following command and press Enter: pip --version This command displays the version of Pip currently installed on your system. Update Pip: To upgrade Pip to the latest version, use the following command for Python 2.x:
🌐
freeCodeCamp
freecodecamp.org › news › pip-upgrade-and-how-to-update-pip-and-python
Pip Upgrade – And How to Update Pip and Python
March 14, 2023 - You can also update Python by running pyenv latest-version-number. For example, python 3.11. When you install that Python version, you install Pip too. In cases when you want to update only Pip, open your terminal and run pip3 install --upgrade pip.
🌐
NBShare
nbshare.io › notebook › 228803083 › How-to-Upgrade-Python-PIP
How to Upgrade Python PIP - Nbshare Notebooks
Lets try installing a python package. example pip install python-levenshtein ... You are using pip version 9.0.1, however version 19.3.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command.
Find elsewhere
🌐
Wikihow
wikihow.com › computers and electronics › software › programming › python › how to update pip on windows, mac, & linux: easy tutorial
How to Update Pip on Windows, Mac, & Linux: Easy Tutorial
April 8, 2025 - If you're using Python 3.4 or later, you can update Pip using the command python -m pip install --upgrade pip. To check your Pip version, use pip3 -V (Python 3) or pip2 -V (Python 2). If you want to update Python in addition to Pip, you can ...
🌐
RS Blog
reneshbedre.com › blog › install-upgrade-pip-windows-mac-linux.html
pip and conda to install and upgrade Python packages
March 26, 2023 - # Windows, Linux, and macOS # using ... · General syntax to install the specific version of Python packages is pip install <python_package_name>==<version>. If you don’t specify the version, the latest version of the Python package ...
🌐
OpenReplay
blog.openreplay.com › how-to-upgrade-pip
How to Upgrade PIP: A Full Guide for Windows, macOS, and Linux
While this command can work, it's better to use `python -m pip install --upgrade pip` to ensure the correct Python version is used. What should I do if I encounter permission errors while upgrading PIP?
🌐
Codedamn
codedamn.com › news › python
How to Update Pip and Python On Your System With Pip Upgrade
June 22, 2023 - Most Linux distributions come with Python pre-installed. To update Python, you can use the package manager provided by your distribution. For Debian-based systems (e.g., Ubuntu), run the following commands: ... After updating, verify the updated ...
🌐
Reddit
reddit.com › r/learnpython › how to update python with pip or terminal on linux?
r/learnpython on Reddit: How to update Python with pip or Terminal on Linux?
March 28, 2021 -

New to Linux (Linux Mint 20) and it's a bit different from Windows.

I'm stuck on Python 3.8 and want to update to python 3.9.

Thanks for any help provided.

UPDATE | Thanks to the fellow members for the support and I found this [ https://www.reddit.com/r/learnpython/comments/kwa428/updating_python_on_linux/ ] and it suggests not to update the system files, including the python installed with the system.

🌐
Python Packaging
packaging.python.org › tutorials › installing-packages
Installing Packages — Python Packaging User Guide
Due to the way most Linux distributions are handling the Python 3 migration, Linux users using the system Python without creating a virtual environment first should replace the python command in this tutorial with python3 and the python -m pip command with python3 -m pip --user.
🌐
BlueVPS
bluevps.com › blog › how to install and upgrade pip on windows/linux?
How To Install and Upgrade Pip on Windows/Linux? - Blog - BlueVPS
In this guide, we will explore how to install Python packages using pip on Windows and Linux operating systems. Moreover, we will also demonstrate how to upgrade pip to the latest version using the command line.
🌐
BitLaunch
bitlaunch.io › blog › how-to-upgrade-pip
How to upgrade your pip package to the latest version
December 20, 2025 - Upgrading pip is again very easy process. Just run the following: ... Bear in mind that this command will try to uninstall the current version and replace it with the new one. If you see the message Not uninstalling pip at /usr/lib/python3/dist-packages, outside environment /usr, it’s because you’re using Ubuntu.
🌐
PhoenixNAP
phoenixnap.com › home › kb › devops and development › how to update pip on linux, windows, and macos
How to Update Pip on Linux, Windows, and macOS
May 15, 2025 - Note: The example uses python -m pip instead of pip --version to ensure compatibility, since the latter command is not always added to the system PATH after installing Python via the installer.
🌐
MonoVM
monovm.com › 🐧 linux 🐧 › how to upgrade pip package to latest version [pip update]
How to Upgrade Pip Package to Latest Version [Pip Update]
January 30, 2024 - Now you have successfully upgraded Pip on your Linux system. It's important to note that some Linux distributions, like Ubuntu, may provide Pip as a separate package that can be updated through the system's package manager. Be sure to follow the method that's appropriate for your specific Linux distribution. Pip update command on a Windows system is a crucial step to ensure your Python environment remains up-to-date and fully functional.
🌐
MTU Service Desk
servicedesk.mtu.edu › TDClient › 1801 › Portal › KB › PrintArticle
Installing, uninstalling, or upgrading Python modules using Pip (Linux)
Python modules are packages, or modules, which can be imported into a project to use. This includes packages like matplotlib, numpy, flask, and many more. You can install and uninstall packages for Python with the Pip package manager. Python modules that are stored on your home drive will only ...