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

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

    I found that I could import the django module from the python interpreter, but django-admin.py could not import it when run from the command line.

    I confirmed that I was using the python interpreter in my virtual environment.

    I was using a 64-bit version of python. Uninstalling, and installing the 32-bit version, then re-creating my venv solved this for me.

提交回复
热议问题