ModuleNotFoundError: No module named 'django'

[root@localhost db_monitor]# python manage.py runserver
Traceback (most recent call last):
File “manage.py”, line 10, in main
from django.core.management import execute_from_command_line
ModuleNotFoundError: No module named ‘django’

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “manage.py”, line 21, in
main()
File “manage.py”, line 16, in main
) from exc
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?
[root@localhost db_monitor]# pip install django
Looking in indexes: https://pypi.doubanio.com/simple/
Collecting django
Downloading https://pypi.doubanio.com/packages/12/68/8c125da33aaf0942add5095a7a2a8e064b3812d598e9fb5aca9957872d71/Django-3.0.4-py3-none-any.whl (7.5 MB)
|████████████████████████████████| 7.5 MB 4.8 MB/s
Collecting asgiref~=3.2
Downloading https://pypi.doubanio.com/packages/68/00/25013f7310a56d17e1ab6fd885d5c1f216b7123b550d295c93f8e29d372a/asgiref-3.2.7-py2.py3-none-any.whl (19 kB)
Requirement already satisfied: pytz in /root/anaconda3/lib/python3.6/site-packages (from django) (2016.10)
Collecting sqlparse>=0.2.2
Downloading https://pypi.doubanio.com/packages/85/ee/6e821932f413a5c4b76be9c5936e313e4fc626b33f16e027866e1d60f588/sqlparse-0.3.1-py2.py3-none-any.whl (40 kB)
|████████████████████████████████| 40 kB 4.5 MB/s
Installing collected packages: asgiref, sqlparse, django
Successfully installed asgiref-3.2.7 django-3.0.4 sqlparse-0.3.1

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值