在/ auth / complete / google-oauth2 /中的ModuleNotFoundError

时间:2018-12-07 06:21:13

标签: django python-3.x oauth-2.0

嗨,我目前正在为我的social-auth-django苦苦挣扎,因为它不断给我

ModuleNotFoundError at /auth/complete/google-oauth2/
No module named 'social_auth'

当我单击登录按钮时,它完美地重定向到google身份验证,但是在输入我的凭据后,当它重定向到我的网站时,它一直给我该错误消息:“)

我是Web开发环境的新手,如果有人可以帮助:D

谢谢

这也是我的代码(settings.py)的一部分

AUTHENTICATION_BACKENDS = (
'social_core.backends.open_id.OpenIdAuth',  # for Google authentication
'social_core.backends.google.GoogleOpenId',  # for Google authentication
'social_core.backends.google.GoogleOAuth2',  # for Google authentication
'django.contrib.auth.backends.ModelBackend',)

SOCIAL_AUTH_PIPELINE = (
'social_auth.backends.pipeline.social.social_auth_user',
'social_auth.backends.pipeline.associate.associate_by_email',
'social_auth.backends.pipeline.user.get_username',
'social_auth.backends.pipeline.social.associate_user',
'social_auth.backends.pipeline.social.load_extra_data',
'social_auth.backends.pipeline.user.update_user_details',
'social_auth.backends.pipeline.user.create_user')

PS。我已经pip安装了social-auth-app-django,pip安装了social-auth-core,pip安装了python-social-auth,删除并重新安装了我的虚拟环境,但是问题仍然存在

D:\Website\newWeb\venv\lib\site-packages\social_core\utils.py in import_module, line 55

0 个答案:

没有答案