[英]from django.allauth.account.adapter import DefaultAccountAdapter ModuleNotFoundError: No module named 'django.allauth'
I have installed django-allauth with docker-compose exec web pipenv install django-allauth
, but I recieve an erro from django.allauth.account.adapter import DefaultAccountAdapter ModuleNotFoundError: No module named 'django.allauth'
, when I use docker-compose exec web python manage.py makemigrations
. I have installed django-allauth with
docker-compose exec web pipenv install django-allauth
, but I recieve an erro from django.allauth.account.adapter import DefaultAccountAdapter ModuleNotFoundError: No module named 'django.allauth'
, when I use docker-compose exec web python manage.py makemigrations
。 Thaks for your help:)谢谢你的帮助:)
In your code you should replace from django.allauth.account.adapter import DefaultAccountAdapter
with from allauth.account.adapter import DefaultAccountAdapter
在您的代码中,您应该将
from django.allauth.account.adapter import DefaultAccountAdapter
替换为from allauth.account.adapter import DefaultAccountAdapter
django.allauth means that you are looking for module allauth inside Django. django.allauth 表示您正在 Django 中寻找模块allauth 。 But allauth is an independent Python module inside Python site-packages.
但allauth是 Python 站点包内的独立 Python 模块。 So just call it without
Django.
所以只需在没有
Django.
prepended.前置。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.