I have created a folder with all my modules for my GAE application and with external libraries like Jinja2 to keep everything sorted in one place. I have folders structure like this:
lib\
\utils\
\__init__.py
\firepython
\jinja2
\jsonpickle
__init__.py
sessions.py
When I try to load Jinja from utils__init__.py, I get error ImportError: No module named jinja2.environment
. When I look at Jinja2 imports instructions, I see them look like from jinja2.loaders
. I try to change them to be like from lib.jinja2.loaders
but some other errors then appear about imports. More than that I don't think it's a good practice to change these imports in external libraries source if there is a more convenient and right way to import modules properly. I also have added some paths to PYTHONPATH
but it doesn't solve all problems. How can I properly import an external package that is placed in another folder, may be with a deep structure?