Upgrade specific `pip` packages in Python

David Y.

The problem

How can I upgrade specific Python packages using pip?

The solution

To upgrade an installed package, call pip install with the --upgrade flag.

pip install --upgrade Django

This will upgrade the package to the latest available versions. It will also upgrade-dependent packages where needed to satisfy the requirements of the new version. To upgrade to a specific version instead, specify it with ==, as below:

pip install --upgrade Django==3.2.16
Join the discussionCome work with us
Share on Twitter
Bookmark this page
Ask a questionImprove this Answer

Related Answers

A better experience for your users. An easier life for your developers.

    TwitterGitHubDribbbleLinkedin
© 2023 • Sentry is a registered Trademark
of Functional Software, Inc.