簡體   English   中英

ModuleNotFoundError:沒有名為“ allauth”的模塊

[英]ModuleNotFoundError: No module named 'allauth'

這是我安裝的應用程序。

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.sites',
    'allauth',
    'allauth.account',
    'allauth.socialaccount',
    'rest_framework',
    'rest_framework.authtoken',
    'rest_auth',
    'rest_auth.registration',

    'corsheaders',
    'articles',
]

我正在使用django 2.1和rest框架。我想實現rest auth注冊。 因此,我遵循了官方文檔中的分步指南。 當我點擊輸入遷移命令python manage.py migrate時,出現以下錯誤:

File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'allauth'

遷移之前,您需要安裝django rest auth軟件包,其中包含所有軟件包,包括allauth

pip install django-rest-auth[with_social]

然后遷移數據庫。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM