Django - “no module named django.core.management”

前端 未结 21 1653
天涯浪人
天涯浪人 2020-12-02 11:46

I get the following error when trying to run Django from the command line.

File manage.py, line 8, in 
     from django.core.management import          


        
相关标签:
21条回答
  • 2020-12-02 12:33

    My case I used pyCharm 5 on mac. I also had this problem and after running this command my problem was solved

    sudo pip install django --upgrade 
    
    0 讨论(0)
  • 2020-12-02 12:34

    I experience the same thing and this is what I do.

    First my installation of

    pip install -r requirements.txt

    is not on my active environment. So I did is activate my environment then run again the

    pip install -r requirements.txt

    0 讨论(0)
  • You can try it like so : python3 manage.py migrate (make sur to be in the src/ directory)

    You can also try with pip install -r requirements.txt (make sur you see the requirements.txt file when you type ls after the migrate

    If after all it still won't work try pip install django

    Hope it helps

    0 讨论(0)
提交回复
热议问题