Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: No module named importlib #105

Closed
kevthehermit opened this issue May 5, 2016 · 1 comment
Closed

ImportError: No module named importlib #105

kevthehermit opened this issue May 5, 2016 · 1 comment

Comments

@kevthehermit
Copy link

Django 1.9 No longer supports django.utils.importlib import_module

from django.utils.importlib import import_module

django.utils.importlib is a compatibility library for when Python 2.6 was still supported. It has been obsolete since Django 1.7, which dropped support for Python 2.6, and is removed in 1.9 per the deprecation cycle.

Use Python's import_module function instead:

from importlib import import_module
The reason you can import it from django.utils.module_loading is that importlib.import_module is imported in that module, it is not because module_loading in any way defines the actual function.

Since django.utils.module_loading.import_module is not part of the public API, it can be removed at any time if it is no longer used - even in a minor version upgrade.

Source - https://stackoverflow.com/questions/32761566/django-1-9-importerror-for-import-module

@kevthehermit
Copy link
Author

OK seems to be fixed somewhere opened in error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant