From 2aa35c674845fc1c3efe5c43c909efe415e50534 Mon Sep 17 00:00:00 2001 From: Fred Shaw <15826700+fred-from-york@users.noreply.github.com> Date: Wed, 21 Feb 2024 13:38:00 +0000 Subject: [PATCH] python: Add note on `pip install` in slim variants Add an image-specific slim variant section for Python. This overrides the default description of a slim variant. The image-specific description clarifies when `pip install` might fail in slim variants of the Python image. --- python/variant-slim.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 python/variant-slim.md diff --git a/python/variant-slim.md b/python/variant-slim.md new file mode 100644 index 000000000..f5a64e018 --- /dev/null +++ b/python/variant-slim.md @@ -0,0 +1,8 @@ +## `%%IMAGE%%:-slim` + +This image does not contain the common Debian packages contained in the default tag and only contains the minimal Debian packages needed to run `%%IMAGE%%`. Unless you are working in an environment where *only* the `%%IMAGE%%` image will be deployed and you have space constraints, we highly recommend using the default image of this repository. + +When using this image `pip install` will work if a suitable built distribution is available for the Python distribution package being installed. `pip install` may fail when installing a Python distribution package from a source distribution. This image does not contain the Debian packages required to compile extension modules written in other languages. Possible solutions if a `pip install` fails include: + +- Use this image and install any required Debian packages before running `pip install`. +- Use the default image of this repository. The default image contains the most commonly required Debian packages. The majority of arbitrary `pip install`s should be successful without additional header/development Debian packages.