Django 1.4 Unknown command: 'runserver'

前端 未结 4 1800
清歌不尽
清歌不尽 2021-02-08 02:52

Something in my python path must have changed because now I cannot run the.

python app/manage.py runserver

The output I get is

         


        
4条回答
  •  旧时难觅i
    2021-02-08 03:01

    Looking through the manager.py code and django.core.management I can come up with some suggestions.

    First, check if the file /django/core/management/commands/runserver.py exists.

    Second, run:

    >>> import sys
    >>> sys.path
    

    If the aforementioned is not in this list than you must set the PYTHONPATH variable.

    Third, (and that's the longest of all shots) if you have changed the DEFAULT_PORT of runserver, try changing it back to 8000.

提交回复
热议问题