Running django in virtualenv - ImportError: No module named django.core.management?

后端 未结 8 832
情歌与酒
情歌与酒 2021-02-04 11:56

I have installed Django after activating my virtualenv but still I am getting following error

from django.core.management import execute_from_command_line
Import         


        
相关标签:
8条回答
  • 2021-02-04 12:34

    If you're using virtualenv, you can add it to your path using sys.path.append('./myvenv/lib/python3.5/site-packages').

    Try closing and opening the terminal again. That worked for me too.

    0 讨论(0)
  • 2021-02-04 12:35

    You should check if django is installed Activate your environment, then run the following command to see which version is installed :

    python -c "import django; print(django.get_version())"
    
    0 讨论(0)
提交回复
热议问题