(CoderZB_First) MrBin:test1 zhangbin$ python manage.py runserver
Traceback (most recent call last):
File "manage.py", line 8, in <module>
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 14, in <module>
) 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?
image.png
解决办法:之前没有安装django,终端安装一下竟然可以了。(不明白项目里面导入django就不报错)
image.png
网友评论