Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

official-documentation-samples/django does not run due to Python version mismatch #539

Open
weslord opened this issue Dec 21, 2024 · 0 comments

Comments

@weslord
Copy link

weslord commented Dec 21, 2024

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
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

No branches or pull requests

1 participant