Opened 11 years ago

Closed 11 years ago

#19841 closed Uncategorized (needsinfo)

Problem in documentation "Writing your first Django app, part 1" with runserver

Reported by: anonymous Owned by: nobody
Component: Documentation Version: 1.4
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


The documentation at "Writing your first Django app, part 1" explains how to start the development server using
python runserver
However on systems where python3 is the default python interpreter, one gets an error like the following:

# python runserver
Traceback (most recent call last):
  File "", line 8, in <module>
    from import execute_from_command_line
ImportError: No module named 'django'

It works fine if one runs
python2 runserver

Now to avoid confusion, since it is not always clear on the first sight, what interpreter runs and since the documentation gives no hint about, that you have to run with python2, it would be better if it told the new user to run the script itself, since the shebang line states the correct interpreter already.
Therefore the documentation could be canged to

chmod +x
./ runserver

and everything should work as expected without python2/3 confusion.

Change History (2)

comment:1 by Aymeric Augustin, 11 years ago

This is a problem with your installation of Django.

How did you install it?

comment:2 by Tim Graham, 11 years ago

Resolution: needsinfo
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top