无法导入Django

时间:2017-07-15 16:37:33

标签: python django pip virtualenv

我启动了我的django项目而没有激活我的virtualenv django-admin startproject my_project和django-admin startapp my_app。 Everythiing很好,直到我关闭我的终端,并停止了服务员。我想重新启动我的服务器,但此消息仍在进行中。我试图安装virtualenv仍然是同样的问题,

File "./manage.py", line 17, in <module>
"Couldn't import Django. Are you sure it's installed and "
ImportError: Couldn't import Django. Are you sure it's installed and 
available on your PYTHONPATH environment variable? Did you forget to 
activate a virtual environment?

请问可能是什么问题以及如何解决这个问题?

1 个答案:

答案 0 :(得分:0)

在激活virtualenv后,您应该在终端运行pip install django