[Answered ]-ImportError using django-social-auth

2👍

Did you try this ?

from social_auth.backends import get_backend

You should not hardcode the name of your project in your code. That makes the code less portable.

If that doesn’t work, then you haven’t install django-social-auth correctly. Fix your setup:

  1. Create a virtualenv, in the parent directory of your project seems fair: virtualenv /path/to/venv

  2. Activate the virtualenv: source /path/to/venv/bin/activate

  3. Install an app ie. from git: pip install -e git+git://github.com/omab/django-social-auth.git#egg=social_auth

I also wrote a more detailed article on django, virtualenv and pip which should be of your interrest.

👤jpic

Leave a comment