Search code examples
djangooauthdjango-cors-headers

ImportError: No module named oauth2_providercorsheaders


I am trying to use django-oauth-toolkit and followed the instructions.

When I try to ./manage.py syncdb, I am always getting an import error:

ImportError: No module named oauth2_providercorsheaders

Of course I already tried to uninstall everything and starting over again. And of course it does not help.

Here is my pip freeze. Not sure whether allauth can interfere with django-oauth-toolkit.

Django==1.6.5
Jinja2==2.7.3
Markdown==2.5.2
MarkupSafe==0.23
Pillow==2.5.3
PyYAML==3.11
Pygments==1.6
South==1.0.1
Sphinx==1.2.3
amqp==1.4.6
anyjson==0.3.3
argparse==1.2.1
billiard==3.3.0.19
boto==2.32.1
celery==3.1.17
dj-database-url==0.3.0
dj-static==0.0.6
django-allauth==0.18.0
django-bootstrap-form==3.1
django-braces==1.4.0
django-celery==3.1.16
django-cors-headers==0.13
django-countries==2.1.2
django-extensions==1.4.0
django-oauth-toolkit==0.7.2
django-qrcode==0.3
django-queryset-csv==0.2.10
django-rest-swagger==0.2.1
django-salesforce==0.4
django-simple-captcha==0.4.2
django-storages==1.1.8
django-toolbelt==0.0.1
djangocms-admin-style==0.2.2
djangorestframework==2.4.3
docutils==0.12
easy-thumbnails==2.1
gunicorn==19.1.1
ipython==2.2.0
kombu==3.0.24
oauthlib==0.7.2
psycopg2==2.5.4
pyparsing==2.0.2
python-openid==2.2.5
pytz==2014.7
requests==2.4.1
requests-oauthlib==0.4.2
shortuuid==0.4.2
simplejson==3.6.3
six==1.7.3
sphinx-rtd-theme==0.1.6
static3==0.5.1
wsgiref==0.1.2

Solution

  • I think you missed a comma in your INSTALLED_APPS between oauth2_provider and corsheaders