简体   繁体   English

为什么“回溯(最近一次通话最后一次):文件”<stdin> ”,第 1 行,在<module> ImportError:当我尝试安装 django 时,没有名为 django 的模块?</module></stdin>

[英]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.

相关问题 Traceback(最近一次调用最后一次):文件“<stdin> ”,第 1 行,在<module> ModuleNotFoundError:没有名为“Webhook”的模块</module></stdin> - Traceback (most recent call last): File “<stdin>”, line 1, in <module> ModuleNotFoundError: No module named 'Webhook' 追溯(最近一次通话):“文件” <stdin> ”,第1行,在 <module> - Traceback (most recent call last): File “<stdin>”, line 1, in <module> 获取回溯(最近一次调用最后一次):文件“<stdin> &quot;,第 1 行,在<module> NameError:名称“文件名”未定义 - Getting Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'filename' is not defined Traceback(最近一次通话最后一次):文件“<stdin> &quot;,第 1 行,在<module> TypeError: object() 没有参数 - Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: object() takes no parameters 回溯(最近调用最后):文件“<stdin> ",第 1 行,在<module> NameError: 名称 'db' 未定义</module></stdin> - Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'db' is not defined 我可以逃避此错误回溯(最近一次通话是最近一次):“文件” <stdin> ”,第1行,在 <module> 档案“ <stdin> ”,第2行,在data_entry中 - can i escape this error Traceback (most recent call last): File “<stdin>”, line 1, in <module> File “<stdin>”, line 2, in data_entry 无法在python 3Traceback(最近一次调用为最新)中找出此错误:“文件” <stdin> ”,第1行,在 <module> NameError:未定义名称“ xlrd” - Cannot figure out this error in python 3Traceback (most recent call last): File “<stdin>”, line 1, in <module> NameError: name 'xlrd' is not defined 追溯(最近一次呼叫最近):AttributeError:文件“”,第1行,模块“ socket”没有属性“ close” - Traceback (most recent call last): File “”, line 1, in AttributeError: module 'socket' has no attribute 'close' 回溯(最近一次调用最后一次):文件“main.py”,第 11 行,在<module> - Traceback (most recent call last): File "main.py", line 11, in <module> 回溯(最近一次调用最后一次):文件“D:\\Python\\PLAY.PY”,第 29 行,在<module> - Traceback (most recent call last): File "D:\Python\PLAY.PY", line 29, in <module>
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM