Yuchu Liu
11/09/2022, 12:25 PMkedro jupyter notebook . When I try to load it from the terminal, in a virtual environment I setup for kedro, it tries to load extension kedro,ipython from a wrong version of Python. As a result, I don't have any kedro specific commas in jupyter notebook. Here is the warning I get when loading a notebook.
[I 13:20:49.212 NotebookApp] Kernel started: 21bb83e7-2e5f-4463-a43e-23744ec3ed02, name: kedro_nfr_transactions
[IPKernelApp] WARNING | Error in loading extension: kedro.ipython
Check your config files in /Users/yuchu_liu/.ipython/profile_default
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/logging/config.py", line 544, in configure
formatters[name] = self.configure_formatter(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/logging/config.py", line 676, in configure_formatter
c = _resolve(cname)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/logging/config.py", line 90, in _resolve
found = __import__(used)
ModuleNotFoundError: No module named 'pythonjsonlogger'
I have tried to load kedro from ipython in the terminal using, and it works perfectly fine.
%load_ext kedro.extras.extensions.ipython
%reload_kedro .
Does anyone know how to debug this issue? Thank you!Yuchu Liu
11/09/2022, 12:25 PMRabeez Riaz
11/09/2022, 12:29 PMwhich both from the terminal and within the notebooks.
The %load_ext works the the ipython shell (not kedro ipython) but not in the normal notebook (not kedro jupyter notebook)Nok Lam Chan
11/09/2022, 2:14 PMRabeez Riaz
11/09/2022, 2:16 PMNok Lam Chan
11/09/2022, 2:16 PMkedro>=0.18.3 - use the alias %load_ext kedro.ipython
• Try running jupyter kernelspec list - and post the output here (do check if there are sensitive info there and mask it if needed)Nok Lam Chan
11/09/2022, 2:17 PMYuchu Liu
11/09/2022, 2:28 PMAvailable kernels:
kedro_related /Users/my_name_here/Library/Jupyter/kernels/kedro_related
python3 /opt/homebrew/Caskroom/miniconda/base/envs/name_of_env/share/jupyter/kernels/python3Nok Lam Chan
11/09/2022, 2:28 PMYuchu Liu
11/09/2022, 2:29 PMYuchu Liu
11/09/2022, 2:29 PMNok Lam Chan
11/09/2022, 2:31 PMFile “/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/logging/config.py” from your error this python path is very different from what you shown above.Nok Lam Chan
11/09/2022, 2:34 PMI am running into an issue withAssume you are using the. When I try to load it from the terminal, in a virtual environment I setup for kedro, it tries to load extensionkedro jupyter notebookfrom a wrong version of Pythonkedro,ipython
kedro_related enviornment and running kedro jupyter notebook , do you click on the UI and choose the kernel (kedro_related )?Yuchu Liu
11/09/2022, 2:35 PMNok Lam Chan
11/09/2022, 2:37 PMYuchu Liu
11/09/2022, 2:37 PMkedro_related )?Yuchu Liu
11/09/2022, 2:37 PMNok Lam Chan
11/09/2022, 2:38 PMkedro jupyter notebook , what happens if you use kedro ipython, does it loads everything correctly?Yuchu Liu
11/09/2022, 2:38 PMYuchu Liu
11/09/2022, 2:39 PMNok Lam Chan
11/09/2022, 2:40 PMNok Lam Chan
11/09/2022, 2:40 PMNok Lam Chan
11/09/2022, 2:41 PMkedro_related env for now
conda activae kedro_related
jupyter kernelspec remove kedro_related
kedro jupyter notebookNok Lam Chan
11/09/2022, 2:42 PMNok Lam Chan
11/09/2022, 2:44 PMkedro jupyter notebookYuchu Liu
11/09/2022, 2:44 PMjupyter kernelspec remove kedro_related
kedro jupyter notebookNok Lam Chan
11/09/2022, 2:44 PMjupyter kernelspec listYuchu Liu
11/09/2022, 2:45 PMAvailable kernels:
kedro_related /Users/my_name_here/Library/Jupyter/kernels/kedro_related
python3 /opt/homebrew/Caskroom/miniconda/base/envs/name_of_env/share/jupyter/kernels/python3Nok Lam Chan
11/09/2022, 2:46 PMYuchu Liu
11/09/2022, 2:46 PMNok Lam Chan
11/09/2022, 2:46 PMkedro jupyter notebook on that machin, it is in the incorrect conda enviornment and it is registered in the kernel.Nok Lam Chan
11/09/2022, 2:47 PMjupyter kernelspec list doesn’t seem to support that, although it works now😅Nok Lam Chan
11/09/2022, 2:47 PM0.18.0Yuchu Liu
11/09/2022, 2:47 PMYuchu Liu
11/09/2022, 2:48 PMNok Lam Chan
11/09/2022, 2:48 PMYuchu Liu
11/09/2022, 2:48 PMNok Lam Chan
11/09/2022, 2:50 PMYuchu Liu
11/09/2022, 2:50 PMRabeez Riaz
11/09/2022, 2:51 PMNok Lam Chan
11/09/2022, 3:00 PM0.18.x series so far I think there are couple changes
• alias %load_ext kedro.ipython
• A better %reload_kedro magic that accepts parameters
• Enabled rich logging in notebook
• Couple fix to make it works better on Databricks.
https://github.com/kedro-org/kedro/issues?q=is%3Aopen+is%3Aissue+milestone%3A%22Improve+the+Interactive+Jupyter+notebook+workflow%22