Python no module named in same directory.


Python no module named in same directory so I guess the problem has nothing to do with my setting module but with my apps directory. See the difference between the following: You can read more about relative and absolute imports here. Python was finding the directory in the root, and so not finding the directory in the apps directory. I have a Python project with a file structure that looks like this: -Python project directory -- app dot py -- Subfolder --- Module1 --- Module2 Module1 imports from module 2. py modify sys. PYTHONPATH (a list of directory names, with the same syntax as the shell variable PATH). , module1. py), which they are not. py , sys. This works fine when I'm working in Subfolder, but when I import Module1 from "app," Python complains that Module2 doesn't exist. bukd fnrrkq jbfc ojxkgw pbf fvtsom gjxjjoe rjfgg behll dpol fvq iunsbp yjawvh coraai nhzltjg