official-documentation-samples/django
does not run due to Python version mismatch #539
Open
Description
Following the instructions in Quickstart: Compose and Django causes the app to crash with an error:
Container django-docker-db-1 Running
Traceback (most recent call last):
File "/usr/local/bin/django-admin", line 8, in <module>
sys.exit(execute_from_command_line())
~~~~~~~~~~~~~~~~~~~~~~~~~^^
[...lines removed for readability...]
File "/usr/local/lib/python3.13/site-packages/django/core/management/templates.py", line 1, in <module>
import cgi
ModuleNotFoundError: No module named 'cgi'
cgi
was removed in the latest version of Python.
The example restricts Django to version 3.2:
Django>=3.0,<4.0
But uses the latest version of Python (incompatible with Django 3.2):
FROM python:3
Metadata
Assignees
Labels
No labels