Python updated pip and wheel

Change effective on 04 December 2024

We have updated the packaging tools used during the build of Python apps as follows:

  • pip updated from 24.0 to 24.3.1 (changelog)
  • wheel updated from 0.44.0 to 0.45.1 (changelog)

Of note, pip 24.1+ now rejects packages that have invalid package versions specified in their metadata. This follows the deprecation warning added in pip 23.2 and visible in build logs since July 2023.

If your build now fails with pip errors that mention "Please use pip<24.1 if you need to use this version" (example), try upgrading to a newer version of that dependency. If that does not help, report the issue with the maintainers of the dependency.

In particular, if your app uses the Celery package you will need to update to at least Celery v5.2.1 (released 2021) or newer. See the Celery release history page for links to upgrade guides.

We strongly recommend updating your app’s dependencies to resolve any errors. However, if you are not able to do so at this time, then you must switch from the default heroku/python buildpack to a buildpack URL of https://github.com/heroku/heroku-buildpack-python#v267 (the previous buildpack version) in order to continue building. However, this must only be used as a short-term workaround, and after fixing your dependencies you must remember to switch back to the heroku/python stable release. For more information, see Managing Buildpacks.