How can I upgrade specific Python packages using pip
?
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