Django: ImportError: no module named social.apps.django_app

I had an application that I created on Windows 7 and it worked perfectly. A few days ago, I switched to Ubuntu and copied the project file to Ubuntu. Now when I try to start the project using python manage.py runserver , I get the following error:

 Traceback (most recent call last): File "manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 338, in execute_from_command_line utility.execute() File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 312, in execute django.setup() File "/usr/local/lib/python2.7/dist-packages/django/__init__.py", line 18, in setup apps.populate(settings.INSTALLED_APPS) File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py", line 85, in populate app_config = AppConfig.create(entry) File "/usr/local/lib/python2.7/dist-packages/django/apps/config.py", line 112, in create mod = import_module(mod_path) File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module __import__(name) ImportError: No module named social.apps.django_app 

What is wrong here? I am new to Ubuntu, so any help would be greatly appreciated. I have the same version of Python and Django installed on Ubuntu as I have on Windows.

+6
source share
3 answers

It looks like you need to install the module on your ubuntu computer that already exists in the Windows 7 environment. If you have the protocol installed, try this on Windows and Ubuntu and find the missing packages

 pip freeze 

You will see something in your Windows environment that is missing from Ubuntu, for example python-social-auth - your fix will do something like Ubuntu:

 pip install python-social-auth 

or

 sudo pip install python-social-auth 
+9
source

Are you using a virtual environment for your project? If so, make sure you activate it before installing project dependencies, use pip freeze inside your virtual env. to see installed packages if you are not using it, a simple pip install python-social-auth should solve your problem normally.

For me, I see the following list of installed packages inside my virtual environment (using Ubuntu 14.04 and Python 2.7.6):

 (venv) root@ubuntu :/home/ubuntu/test-auth# pip install python-social-auth (venv) root@ubuntu :/home/ubuntu/test-auth# pip freeze PyJWT==1.4.0 argparse==1.2.1 oauthlib==1.0.1 python-openid==2.2.5 python-social-auth==0.2.12 requests==2.7.0 requests-oauthlib==0.5.0 six==1.9.0 wsgiref==0.1.2 
+2
source

social-auth-app-django is the one that should be used with they reorganized the code base .

0
source

All Articles