ImportError: cannot import name 'apps' from 'django.apps'
来源:3-7 xadmin后台管理系统的配置
两努
2018-12-22
老师,我按照视频加完xadmin后,想要makemigrations时,报错
报错内容如下
Failed to get real commands on module “MxShop3”: python process died with code 1: Traceback (most recent call last):
File “/Applications/PyCharm.app/Contents/helpers/pycharm/_jb_manage_tasks_provider.py”, line 16, in
from django_manage_commands_provider._parser import parser
File “/Applications/PyCharm.app/Contents/helpers/pycharm/django_manage_commands_provider/_parser/parser.py”, line 11, in
from django.core.management import ManagementUtility, get_commands
File “/Users/MG/VueShop6/lib/python3.7/site-packages/django/core/management/init.py”, line 10, in
from django.apps import apps
File “/Users/MG/VueShop6/lib/python3.7/site-packages/django/apps/init.py”, line 2, in
from .registry import apps
File “/Users/MG/VueShop6/lib/python3.7/site-packages/django/apps/registry.py”, line 15, in
django.setup()
File “/Users/MG/VueShop6/lib/python3.7/site-packages/django/init.py”, line 13, in setup
from django.apps import apps
ImportError: cannot import name ‘apps’ from ‘django.apps’ (/Users/MG/VueShop6/lib/python3.7/site-packages/django/apps/init.py)
怎么办
1回答
-
bobby
2018-12-24
你的django版本是多少呢?
00
Python前后端分离开发Vue+Django REST framework实战
2873 学习 · 2457 问题