1

Every time I am running the application from the Github Repository, I am getting the following error:

Traceback (most recent call last):
  File "C:/Users/lenovo-pc/Desktop/Django-Social-Authentication-master/socialauth/manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "C:\Python35\lib\site-packages\django\core\management\__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "C:\Python35\lib\site-packages\django\core\management\__init__.py", line 338, in execute
    django.setup()
  File "C:\Python35\lib\site-packages\django\__init__.py", line 27, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "C:\Python35\lib\site-packages\django\apps\registry.py", line 85, in populate
    app_config = AppConfig.create(entry)
  File "C:\Python35\lib\site-packages\django\apps\config.py", line 94, in create
    module = import_module(entry)
  File "C:\Python35\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 956, in _find_and_load_unlocked
ImportError: No module named 'social_django'

I want to know what is social_django all about? I have installed many libraries, but non of then have satisfied this error:

python-social-auth[django]
social-auth-app-django

But nothing happens. Please let me know what I should do.

janos
  • 120,954
  • 29
  • 226
  • 236
Jaffer Wilson
  • 7,029
  • 10
  • 62
  • 139

2 Answers2

2

The Python executable you use to run the application doesn't have social_django installed. You can verify this by running these commands:

python manage.py shell
import social_django

This will give you an error, for the same reason.

You can install it with:

pip install social-auth-app-django
janos
  • 120,954
  • 29
  • 226
  • 236
  • My reply is kinda late but I am facing this same issue, i tried the import and it worked fine without any errors but i still get module not found error – malik727 Feb 11 '20 at 17:18
1

The github project you are referring to, has dependency on package 'social_django'. You can check it here.

So you would need to install 'social_django' that can be installed by

pip install social-auth-app-django

I know, you have mentioned this in the question itself but I am pretty sure that the package is not installed.

Mohammad Mustaqeem
  • 1,034
  • 5
  • 9