[英]why 'Traceback (most recent call last): File “<stdin>”, line 1, in <module> ImportError: No module named django' when im trying to install django?
So I was trying to install django.所以我试图安装 django。 I have used pip3 install django
, and this what happened:我已经使用pip3 install django
,这发生了什么:
Then i tried to look if my django was having no problem by typing import django
on python.然后我试图通过在 python 上键入import django
来查看我的 django 是否没有问题。 But this what happened to me:但这发生在我身上:
Can anyone help me?谁能帮我? Thanks, it helps me a lot!谢谢,对我帮助很大!
You installed Django for python 3. When you type python
in the terminal you opening python 2.7(you can see that in terminal), so try python3
instead.您为 python 安装了 Django 3. 当您在终端中键入python
时,您打开的是 Z23EEEB4347BDD26BDDZ, python3
7(您可以在终端中看到),所以请尝试在终端中查看。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.