Ich versuche python-social-auth
mit Django 1.9 und Python 3 zu verwenden. Soweit ich das beurteilen kann, habe ich alle notwendigen Voraussetzungen installiert, und habe alle erforderlichen Einstellungen in meinem settings.py
. Aber wenn ich versuche, Migrationen zu laufen, oder die Django Dev-Server laufen, ich die folgende Fehlermeldung erhalten:python-social-auth mit Django: ImportError: Kein Modul namens 'openid.association'
ImportError: No module named 'openid.association'
Der vollständige Rückverfolgung wird wie folgt:
Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x7f6fe7ea5a60>
Traceback (most recent call last):
File "/home/ethan/.virtualenvs/flywithme/lib/python3.5/site-packages/django/utils/autoreload.py", line 226, in wrapper
fn(*args, **kwargs)
File "/home/ethan/.virtualenvs/flywithme/lib/python3.5/site-packages/django/core/management/commands/runserver.py", line 109, in inner_run
autoreload.raise_last_exception()
File "/home/ethan/.virtualenvs/flywithme/lib/python3.5/site-packages/django/utils/autoreload.py", line 249, in raise_last_exception
six.reraise(*_exception)
File "/home/ethan/.virtualenvs/flywithme/lib/python3.5/site-packages/django/utils/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/home/ethan/.virtualenvs/flywithme/lib/python3.5/site-packages/django/utils/autoreload.py", line 226, in wrapper
fn(*args, **kwargs)
File "/home/ethan/.virtualenvs/flywithme/lib/python3.5/site-packages/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/ethan/.virtualenvs/flywithme/lib/python3.5/site-packages/django/apps/registry.py", line 108, in populate
app_config.import_models(all_models)
File "/home/ethan/.virtualenvs/flywithme/lib/python3.5/site-packages/django/apps/config.py", line 202, in import_models
self.models_module = import_module(models_module_name)
File "/home/ethan/.virtualenvs/flywithme/lib/python3.5/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 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 662, in exec_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
File "/home/ethan/.virtualenvs/flywithme/lib/python3.5/site-packages/social/apps/django_app/default/models.py", line 9, in <module>
from social.storage.django_orm import DjangoUserMixin, \
File "/home/ethan/.virtualenvs/flywithme/lib/python3.5/site-packages/social/storage/django_orm.py", line 5, in <module>
from social.storage.base import UserMixin, AssociationMixin, NonceMixin, \
File "/home/ethan/.virtualenvs/flywithme/lib/python3.5/site-packages/social/storage/base.py", line 12, in <module>
from openid.association import Association as OpenIdAssociation
ImportError: No module named 'openid.association'
Man schlage ich in meiner Suche gefunden war, python-openid
loszuwerden und python3-openid
zu installieren. Das hat nicht für mich funktioniert. Ich habe auch eine Reihe von Beiträgen gesehen, die mit ImportError
s und python-social-auth
in Verbindung stehen, aber ich bin nicht in der Lage gewesen, eine Lösung zu finden, die für mich funktioniert. Ich gehe davon aus, dass ich etwas falsch konfiguriert habe/nicht konfiguriert habe, aber ich bin mir nicht sicher was. Was mache ich hier falsch? durch die Deinstallation alle Versionen von Python-openid und danach Entfernen und Neuinstallation python-sozial-Auth
Vielen Dank für die Antwort. Ich habe dieses Problem gelöst, indem ich stattdessen django-allauth verwendet habe: http://www.intenct.nl/projects/django-allauth/. Ich mag diese Bibliothek bisher sehr. – elethan
Oder einfach: 'pip install --ignore-installed python-social-auth'. – Palasaty