[Solved] Pyconfigini: ImportError: No module named lib.pyconfigini


The problem is that you’re running

python setting.py

from app/ directory (which at the moment of script start becomes current working directory) . Python looks for modules in directories that are listed in PYTHONPATH environment variable (you can get access to it from Python code via sys.path variable).

This list of directories contains standard site-packages, dist-packages, etc. directories and you current working directory – a directory, from which you’re trying to run your script.

As you can see from the above information, lib package cannot be found as it doesn’t exist in directories listed in sys.path.

So, I advice you to change entry point script location to you root directory, where app and lib packages are located.

But if you wan’t to test settings.py module for some reason running it directly, you can define your PYTHONPATH manually, running your script e.g. such way:

PYTHONPATH="../lib" python ./settings.py

This will patch your PYTHONPATH with needed lib directory.

Another way to run your app is to put lib package inside app/ directory.

4

solved Pyconfigini: ImportError: No module named lib.pyconfigini