Skip to content

fix: pin Python to 3.11-slim to resolve distutils removal in 3.12+ - #593

Open
Dev00333 wants to merge 1 commit into
iam-veeramalla:mainfrom
Dev00333:fix/dockerfile-python-version
Open

fix: pin Python to 3.11-slim to resolve distutils removal in 3.12+#593
Dev00333 wants to merge 1 commit into
iam-veeramalla:mainfrom
Dev00333:fix/dockerfile-python-version

Conversation

@Dev00333

@Dev00333 Dev00333 commented Jun 9, 2026

Copy link
Copy Markdown

Problem->
FROM python:3 now resolves to Python 3.14. Django 3.2 depends on distutils
which was removed in Python 3.12+, causing build failure:

ModuleNotFoundError: No module named 'distutils'

Fix->
Pinned base image to python:3.11-slim.

  • Python 3.11 includes distutils, fully compatible with Django 3.2
  • slim variant reduces image size vs full image

Tested->
docker build -t pyapp . ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant