I have a problem with python module import.
I installed django (this can be any other module). I use this module:
from django.template import Context
# other imports
# use Context
I have a folder in my application named “utilities”. In this folder I created a file “django.py” – this file contains some functions to work with django.
So I import django in my module and I get error:
File “…\utilities\django.py”, line 1, in
from django.template import Context
ImportError: No module named template
You will have to enable absolute imports at the top of the file:
You will then have to convert the imports in the module into absolute or relative imports as appropriate.