I'm trying to import a few libraries into my program (which is a google AppEngine application).
Basically, I'm supposed to put all libraries in the root folder, but I've just created another folder called lib and placed them within that folder. (I've created the __init__.py
)
Imports regularly work fine by using the import lib.module
or from lib import module
, but what happens is that when I try to import a complete package, for instance a folder named pack1 with various modules in it, by calling from lib.pack1 import *
, I get this error in one of the modules who has accessed another module statically, i.e. from pack1.mod2 import sth
.
What is the easy and clean way to overcome this? Without modifying the libraries themselves.
Edit: Using Python 2.7.
Edit: Error: when using import lib.pack1
, I get ImportError: No module named pack1.mod1
.