python-social-auth: ImportError: No module named social_django.models

When i tried makemigrations i take following error

Traceback (most recent call last):
  File "manage.py", line 22, in <module>
    execute_from_command_line(sys.argv)
  File "/home/giverroot/django/gve1/lib/python2.7/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
    utility.execute()
  File "/home/giverroot/django/gve1/lib/python2.7/site-packages/django/core/management/__init__.py", line 327, in execute
    django.setup()
  File "/home/giverroot/django/gve1/lib/python2.7/site-packages/django/__init__.py", line 18, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/home/giverroot/django/gve1/lib/python2.7/site-packages/django/apps/registry.py", line 108, in populate
    app_config.import_models(all_models)
  File "/home/giverroot/django/gve1/lib/python2.7/site-packages/django/apps/config.py", line 202, in import_models
    self.models_module = import_module(models_module_name)
  File "/usr/local/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/home/giverroot/django/gve1/lib/python2.7/site-packages/social/apps/django_app/default/models.py", line 1, in <module>
    from social_django.models import AbstractUserSocialAuth, UserSocialAuth, Nonce, Association, Code, DjangoStorage
ImportError: No module named social_django.models

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 2
  • Comments: 24 (7 by maintainers)

Most upvoted comments

You also need to install social-auth-app-django and add social.apps.django_app.default to your INSTALLED_APPS in your settings.py file.

@palzuncoff

As for Dec 03 2016, this library is now deprecated.

You should be using the new social-app-django.

Check out how to use that in this doc: https://github.com/omab/python-social-auth/blob/master/MIGRATING_TO_SOCIAL.md

Try with python manage.py migrate --fake.

@fendyh I do not recomment going back to django-social-out, that codebase was abandoned years ago and it’s very outdated at the memoment. If you stick to python-social-auth==0.2.21, you will have Django 1.7 support.

Ok. You need to have your INSTALLED_APPS like: 'social_django', 'social.apps.django_app.default',