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

后端 未结 8 849
情歌与酒
情歌与酒 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:32

    If you already activated your virtualenv (source /path/bin/activate) then check if you have installed Django.

    pip install django
    

    With next command you can see if Django was installed.

    pip freeze | grep django
    

    Another thing that you can try is to remove first line (#!/usr/bin/env python) in the manage.py file.

提交回复
热议问题