question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Running `kedro install` , `kedro ipython` or `kedro jupyter notebook` from my project root, I get `No such command` errors

See original GitHub issue

Description

When running kedro install , kedro ipython or kedro jupyter notebook from my project root, I get No such command errors.

Context

I’ve just intalled kedro on a new env and I’m trying to use it on a notebook. jupyter notebook command works normally, opening a fully functional notebook instance. Same doesn’t happens with kedro jupyter notebook

Steps to Reproduce

  1. Created new conda env, installed jupyter notebook and kedro
  2. use kedro jupyter notebook or kedro install

Expected Result

Kedro with notebook should open

Actual Result

An error occurs:

Usage: kedro [OPTIONS] COMMAND [ARGS]...
Try 'kedro -h' for help
No such command 'jupyter'
Usage: kedro [OPTIONS] COMMAND [ARGS]...
Try 'kedro -h' for help
No such command 'install'

Your Environment

  • Kedro: 0.17.5
  • Python: 3.6.12
  • OS: Windows 10

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
ghostcommented, Aug 26, 2022

My user error was not running kedro from the root of the project. Kedro still runs from any location, but only from the project root you’ll get the full set of commands.

1reaction
shawnboltzcommented, Jan 12, 2022

@AntonyMilneQB, it is weird indeed. I feel like it’s probably user error because I’m dusting it off after not having used it in a few months… and today it is actually working in both the new test environment and the original environment for reasons I can’t explain.

For completeness, here are the outputs using my new environment:

(kedro_test_environment) user@computer:~/path/to/kedro/project$ kedro ipython
-------------------------------------------------------------------------------
Starting a Kedro session with the following variables in scope
startup_error, context
Use the line magic %reload_kedro to refresh them
or to see the error message if they are undefined
-------------------------------------------------------------------------------
ipython
Python 3.8.12 | packaged by conda-forge | (default, Oct 12 2021, 21:59:51) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.31.0 -- An enhanced Interactive Python. Type '?' for help.
{error from my project hooks complaining about a package I haven't installed in this environment yet}
(kedro_test_environment) user@computer:~/path/to/kedro/project$ kedro jupyter
Usage: kedro jupyter [OPTIONS] COMMAND [ARGS]...

  Open Jupyter Notebook / Lab with project specific variables loaded, or
  convert notebooks into Kedro code.

Options:
  -h, --help  Show this message and exit.

Commands:
  convert   Convert selected or all notebooks found in a Kedro project to...
  lab       Open Jupyter Lab with project specific variables loaded.
  notebook  Open Jupyter Notebook with project specific variables loaded.
(kedro_test_environment) user@computer:~/path/to/kedro/project$ kedro jupyter notebook
{error from my project hooks complaining about a package I haven't installed in this environment yet}
(kedro_test_environment) user@computer:~/path/to/kedro/project$ kedro jupyter lab
{error from my project hooks complaining about a package I haven't installed in this environment yet}
(kedro_test_environment) user@computer:~/path/to/kedro/project$ which jupyter
/home/user/anaconda3/envs/kedro_test_environment/bin/jupyter
(kedro_test_environment) user@computer:~/path/to/kedro/project$ which kedro
/home/user/anaconda3/envs/kedro_test_environment/bin/kedro

From the original environment (no idea what is different from before…):

(original_environment) user@computer:~/path/to/kedro/project$ kedro ipython
-------------------------------------------------------------------------------
Starting a Kedro session with the following variables in scope
startup_error, context
Use the line magic %reload_kedro to refresh them
or to see the error message if they are undefined
-------------------------------------------------------------------------------
ipython
Python 3.8.12 | packaged by conda-forge | (default, Oct 12 2021, 21:59:51) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.29.0 -- An enhanced Interactive Python. Type '?' for help.
(original_environment) user@computer:~/path/to/kedro/project$ kedro jupyter
Usage: kedro jupyter [OPTIONS] COMMAND [ARGS]...

  Open Jupyter Notebook / Lab with project specific variables loaded, or
  convert notebooks into Kedro code.

Options:
  -h, --help  Show this message and exit.

Commands:
  convert   Convert selected or all notebooks found in a Kedro project to...
  lab       Open Jupyter Lab with project specific variables loaded.
  notebook  Open Jupyter Notebook with project specific variables loaded.
(original_environment) user@computer:~/path/to/kedro/project$ kedro jupyter notebook
-------------------------------------------------------------------------------
Starting a Kedro session with the following variables in scope
startup_error, context
Use the line magic %reload_kedro to refresh them
or to see the error message if they are undefined
The choice of kernels is limited to the default one.
(restart with --all-kernels to get access to others)
-------------------------------------------------------------------------------
/home/user/anaconda3/envs/original_environment/bin/python -m jupyter notebook --ip 127.0.0.1 --MappingKernelManager.cull_idle_timeout=30 --MappingKernelManager.cull_interval=30 --NotebookApp.kernel_spec_manager_class=kedro.framework.cli.jupyter.SingleKernelSpecManager '--KernelSpecManager.default_kernel_name='"'"'KedroProject"'"''
{normal startup information}

etc.

I suppose I will keep you posted if the error shows up again?

Thanks for your help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use Kedro with IPython and Jupyter Notebooks/Lab
The command runs the nodes from your default project pipeline in a sequential manner. To parameterise your pipeline run, refer to a later...
Read more >
Kedro and Jupyter Notebooks - Read the Docs
Kedro offers a command ( kedro jupyter notebook ) to create a Jupyter kernel named kedro_<package_name> that is almost identical to the default...
Read more >
Use Kedro with IPython and Jupyter - Read the Docs
This page demonstrates how to use Kedro with IPython, Jupyter Notebook and JupyterLab. We also recommend a video by Data Engineer One and...
Read more >
Kedro's command line interface - Read the Docs
Kedro's command line interface (CLI) is used to give commands to Kedro via a terminal shell (such as the terminal app on macOS,...
Read more >
Spaceflights tutorial FAQs — Kedro 0.18.3 documentation
Do you see the following for one of the raw datasets, make sure you have saved catalog.yml ? ... Call exit() within the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found