This reference documentation offers an in-depth description of the behavior and configuration options of the Paketo Python Buildpack. For explanations of how to use the buildpack for several common use-cases, see the Paketo Python Buildpack How To documentation.
The Python buildpack supports several versions of CPython, Pip and Pipenv. For more details on the specific versions supported in a given buildpack version, see the release notes.
The Python Buildpack sets a few environment variables during the
launch phases of the app lifecycle. The sections below describe each
environment variable and its impact on your app.
environment variable is used to add directories where python will look for
The CPython buildpack sets the
PYTHONPATH value to its installation location,
and the Pip, Pipenv buildpack prepends their
site-packages location to it.
site-packages is the target directory where packages are installed to.
environment variable is used to set the user base directory.
The value of
PYTHONUSERBASE is set to the location where these buildapcks install
the application packages so that it can be consumed by the app source code.
The Python Buildpack sets the default start command
python. This starts the Python
REPL (read-eval-print loop) at launch.
The Python Buildpack comes with support for
that lets users set custom start commands easily.
Last modified: January 20, 2022