django File “./server/manage.py“, line 11, in main from django.core.management import execute_fr

File “./server/manage.py”, line 11, 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 “./server/manage.py”, line 22, in
main()
File “./server/manage.py”, line 13, in main
raise ImportError(
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?

pip install -U django
重新迁移数据库
python3 manage.py migrate
python3 manage.py runserver 0.0.0.0:80
之后成功运行
原来是加sudo 运行就报错 迁移也报错

已标记关键词 清除标记
©️2020 CSDN 皮肤主题: 数字20 设计师:CSDN官方博客 返回首页