How can i import my module lib.py in my script module1.py from the following directory structure?
|-
|-lib/lib.py
|-module1/module1.py
This is very, very depend on the use case.
import lib.lib
.lib
is an actual package, you can (and should) probably install it and import it the same way.lib
and module1
are under the same package already, you can use relative import as well: from ..lib import lib
, or something similar.