This is the way

Copypip install <package_name> --upgrade

or in short

Copypip install <package_name> -U

Using sudo will ask to enter your root password to confirm the action, but although common, is considered unsafe.

If you do not have a root password (if you are not the admin) you should probably work with virtualenv.

You can also use the user flag to install it on this user only.

Copypip install <package_name> --upgrade --user
Answer from borgr on Stack Overflow
🌐
Python Packaging
packaging.python.org › tutorials › installing-packages
Installing Packages - Python Packaging User Guide
If pip does not find a wheel to install, it will locally build a wheel and cache it for future installs, instead of rebuilding the source distribution in the future. Upgrade an already installed SomeProject to the latest from PyPI.
🌐
pip
pip.pypa.io › en › stable › installation
Installation - pip documentation v26.1.2
There are also zip applications for specific pip versions, named pip-X.Y.Z.pyz. The zip application can be run using any supported version of Python: ... You may need to configure your system to recognise the .pyz extension before this will work. Depending on how you installed Python, there might be other mechanisms available to you for installing pip such as using Linux package managers.
🌐
OperaVPS
operavps.com › docs › pip update all packages to latest version
Pip Update All Packages to Latest Version [Pip Upgrade]
6 days ago - pip list --outdated sudo pip install --upgrade package_name_1 package_name_2 · This step allows you to selectively pip update packages based on necessity. Higher pip versions may prefer JSON output parsing: ... For a comprehensive approach, to pip update all packages or upgrade all pip packages, run the command below: pip list --outdated --format=freeze | cut -d '=' -f 1 | xargs -n1 sudo pip install --upgrade...
🌐
Note.nkmk.me
note.nkmk.me › home › python
How to Use pip (Install, Update, Uninstall Packages) | note.nkmk.me
April 18, 2025 - To update installed packages to their latest versions, use the pip install command with the --upgrade or -U option.
🌐
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 - Now that you have the latest pip version, you can update it in the future using the command python3 -m pip install --upgrade pip. ... Include your email address to get a message when this question is answered.
🌐
pip
pip.pypa.io › en › stable › cli › pip_install
pip install - pip documentation v26.1.2
This will guarantee an update to ... command. Install a local project in “editable” mode. See the section on Editable Installs. ... python -m pip install -e ....
🌐
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 - First, check the versions of Python and Pip you have by running python3 --version and pip3 --version: Go to https://www.python.org/downloads/macos/ and select the release you want: For me, I picked 3.11 because it’s now stable.
Find elsewhere
🌐
Medium
medium.com › @python-javascript-php-html-css › effortlessly-upgrade-all-python-packages-using-pip-1b9e720a6be0
Upgrade All Python Packages Effortlessly With pip
August 24, 2024 - While individual package updates are straightforward with pip install — upgrade package_name, updating all packages simultaneously requires a more automated approach. One strategy is to use a requirements file, which lists all the dependencies ...
🌐
GitHub
github.com › realiti4 › pip-upgrade
GitHub - realiti4/pip-upgrade: Upgrade your pip packages with one line. A fast, reliable and easy tool for upgrading all of your packages while not breaking any dependencies · GitHub
Upgrade your pip packages with one line. A fast, reliable and easy tool for upgrading all of your packages while not breaking any dependencies - realiti4/pip-upgrade
Starred by 36 users
Forked by 3 users
Languages   Python
🌐
MonoVM
monovm.com › blog › tutorials › how to upgrade pip package to latest version [pip update]
How to Upgrade Pip Package to Latest Version [Pip Update]
January 30, 2024 - Update All Packages: If you want to update all the packages in your Python environment to their latest versions, use the following command: pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U
🌐
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.
🌐
pip
pip.pypa.io › en › stable › installing
This page has moved - pip documentation v26.1.2
How pip is used in interactive environments (i.e. CI, CD) ... You should be redirected automatically in 3 seconds. If that didn’t work, here’s a link: Installation
🌐
ActiveState
activestate.com › resources › quick-reads › how-to-update-all-python-packages
Secure Python Packages Built From Source | ActiveState
Vetted Python packages delivered as native Wheels through pip and your existing artifact repositories. Built from source, continuously remediated, SLA-backed.
🌐
Python Central
pythoncentral.io › how-to-use-pip-simple-guide-to-install-update-uninstall-packages
How To Use Pip (Simple Guide To Install, Update, Uninstall Packages) | Python Central
December 13, 2022 - When an update for pip is available, and you run a pip command, you will see a message that says, “You are using pip version xy.a, however version xy.b is available.” You can run “pip install --upgrade pip” to install and use the new ...
🌐
PyPI
pypi.org › project › pip-upgrade-tool
pip-upgrade-tool · PyPI
An easy tool for upgrading all of your packages while not breaking dependencies
      » pip install pip-upgrade-tool
    
Published   Jan 18, 2026
Version   1.1.0
🌐
It's FOSS
itsfoss.com › upgrade-pip-packages
How to Upgrade Python Packages with Pip
September 1, 2023 - To upgrade every python package, you’d need to follow the given command: pip3 list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip3 install -U
🌐
GitHub
gist.github.com › hritik5102 › 35b2886771d60fc6d7a95b6fd55c62ba
How To Update All Python Packages · GitHub
Update all packages without interruption (expect in case of hard errors) (pip list --outdated) | Select -Skip 2 | % {py -m pip install --upgrade $($_.split(' ')[0])} ... plus one more spell: pip list --format=freeze | awk -F '==' '{print $1}' ...
🌐
Flexiple
flexiple.com › python › pip-upgrade
Pip Upgrade – And How to Update Pip and Python - Flexiple
March 4, 2024 - This introduction guides you through the simple yet essential processes of upgrading Pip and updating Python to optimize your coding experience. Updating Python and Pip on macOS involves a few straightforward steps to ensure your development environment remains up-to-date. This process enhances security, provides access to the latest features, and improves compatibility with other Python packages. Install Homebrew: If not already installed, open Terminal and install Homebrew, a package manager for macOS, by running: