[Fixed]-Python-social-auth with Django: ImportError: No module named 'social_django'

46👍

To use Django with python social auth, you need to install the Django app as well.

You can specify that you want to install the extra requirements for Django when you install python-social-auth:

pip install python-social-auth[django]

Or, in this case, you can install the missing package individually:

pip install social-auth-app-django

6👍

Probably you should use pip 3:

pip3 install social-auth-app-django

4👍

USE pip install python-social-auth[django] instead of pip install python-social-auth while installing


i have
first done install
pip install python-social-auth

Run

error: No module named ‘social_django’

Then i install

pip install python-social-auth[django]

RUN

Operations to perform:
Apply all migrations: admin, auth, contenttypes, music, sessions, social_django
Running migrations:
Applying social_django.0001_initial… OK
Applying social_django.0002_add_related_name… OK
Applying social_django.0003_alter_email_max_length… OK
Applying social_django.0004_auto_20160423_0400… OK
Applying social_django.0005_auto_20160727_2333… OK
Applying social_django.0006_partial… OK


Running migrations:

For extra support

Migrating from python-social-auth to split social

enter link description here

👤negi

2👍

Just run:

pip install social-auth-app-django

1👍

If you are using pipenv like me don’t forget to enter the shell and then install (I forgot to do so and it caused similar errors):

pipenv shell
pipenv install python-social-auth-app-django

then add social_django to install apps

I understand this wasn’t the original question but hope it helps.

👤Amr

Leave a comment