Also, why when I run kedro run it works, but when ...
# questions
j
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
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
@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.