Django 1.4 Unknown command: 'runserver'

前端 未结 4 1727
清歌不尽
清歌不尽 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条回答
  •  日久生厌
    2021-02-08 03:08

    I will add my answer to the same problem I had. This was unrelated from Django version, but in an old instance of my project I was providing my own Django copy and not installing from pip. Later I decided to use Pip installed Django.

    When I pulled the changes on the server, my repo's copy of Django files were deleted but not the .pyc files. manage.py would still import the old .pyc files making the imports break half way and the error was the same "Unknown command: runserver".

    Naturally, fully deleting the folder with the .pyc files fixed the problem.

提交回复
热议问题