https://kedro.org/ logo
#questions
Title
# questions
j

Jackson

08/07/2023, 3:34 AM
Also, why when I run kedro run it works, but when I run using python src/../nodes.py it show no module named xxx?
d

Deepyaman Datta

08/07/2023, 4:08 AM
kedro run
dynamically modifies the path during a local run to include the
src/
folder. (This makes sense, because packagin a Kedro project would expose the module defined in
src/
, and this is just a fairly standard practice is using a src layout (see https://packaging.python.org/en/latest/discussions/src-layout-vs-flat-layout/, if you don't know what that is).
n

Nok Lam Chan

08/07/2023, 4:32 PM
@Jackson The short answer is you should do
pip install -e .
to install that package.
What it does is that it add the path to somewhere Python can search. Kedro does that behind the scene automatically. But if you need to run it as a package - you still need to install it first.