# Pip Upgrade to a Specific Version of a Package

> Run pip install --upgrade with a package name to get the latest version, or append ==version to upgrade to a specific release and update dependencies

**URL:** https://sentry.io/answers/upgrade-specific-pip-packages-in-python/

---

## The problem

How can I upgrade specific Python packages using `pip`?

## The solution

To upgrade an installed package, call `pip install` with the [`--upgrade`](https://pip.pypa.io/en/stable/cli/pip_install/#cmdoption-U) flag.

```sh
pip install --upgrade Django
```

This will upgrade the package to the latest available versions. It will also [upgrade-dependent packages where needed](https://pip.pypa.io/en/stable/cli/pip_install/#cmdoption-upgrade-strategy) to satisfy the requirements of the new version. To upgrade to a specific version instead, specify it with `==`, as below:

```sh
pip install --upgrade Django==3.2.16
```

---

*Source: [sentry.io/answers/upgrade-specific-pip-packages-in-python/](https://sentry.io/answers/upgrade-specific-pip-packages-in-python/)*
