Skip to content

Installation configuration


These options have no effect when the project installation is disabled.

UV

You may set the PYAPP_UV_ENABLED option to true or 1 to use UV for virtual environment creation and project installation.

Version

You may use a specific X.Y.Z version by setting the PYAPP_UV_VERSION option.

By default, a version of UV that has already been downloaded by a PyApp application is used. If UV has not yet been downloaded then the latest version is used.

Only bootstrap

You may set the PYAPP_UV_ONLY_BOOTSTRAP option to true or 1 to only use UV for virtual environment creation and continue using pip for project installation.

Source

You may explicitly set the PYAPP_UV_SOURCE option in order to download your own UV release archive. This takes precedence over any defined version.

The value must end with the archive's real file extension, which is used to determine the extraction method.

pip

These options have no effect when UV is enabled.

Externally managed

You may set the PYAPP_PIP_EXTERNAL option to true or 1 to use the standalone versions of pip rather than whatever the distribution provides.

By default, the latest version is used. You may use a specific X.Y.Z version by setting the PYAPP_PIP_VERSION option.

Tip

This provides a significant installation speed up when full isolation is not enabled.

Allowing configuration

You may set the PYAPP_PIP_ALLOW_CONFIG option to true or 1 to allow the use of environment variables and other configuration at runtime.

Virtual environments

When full isolation is not enabled, you may set the PYAPP_UPGRADE_VIRTUALENV option to true or 1 to create virtual environments with virtualenv rather than the standard library's venv module.

Extra installer arguments

You may set the PYAPP_PIP_EXTRA_ARGS option to provide extra arguments to the pip install (or UV equivalent) command at runtime when installing or updating the project e.g. --only-binary :all: --extra-index-url URL.

Location

The default location of your application's installation differs based on the operating system and can be overridden at runtime with the PYAPP_INSTALL_DIR_<PROJECT_NAME> environment variable where <PROJECT_NAME> is the uppercased version of the project name.

Skipping installation

You may set the PYAPP_SKIP_INSTALL option to true or 1 to skip installing the project in the distribution. This allows for entirely predefined distributions and thus no network calls at runtime if used in conjunction with distribution embedding.

When project installation is skipped, the update command will not be available. You may set the PYAPP_ALLOW_UPDATES option to true or 1 to expose the command anyway. Be sure to set the appropriate project options as configuring a prebuilt distribution does not require those.