Hi Team, I am trying to launch a kedro viz in my ...
# questions
t
Hi Team, I am trying to launch a kedro viz in my new kedro project, but i am hitting the below error:
Copy code
kedro viz
[05/30/24 10:54:57] INFO     Using `conf/logging.yml` as logging configuration. You can change this by setting the          __init__.py:249
                             KEDRO_LOGGING_CONFIG environment variable accordingly.                                                        
[05/30/24 10:55:03] WARNING  /opt/miniconda3/envs/portfolio/lib/python3.8/site-packages/kedro_viz/models/flowchart.py:13:   warnings.py:109
                             KedroDeprecationWarning: 'TRANSCODING_SEPARATOR' has been moved to                                            
                             'kedro.pipeline.transcoding', and the alias will be removed in Kedro 0.20.0                                   
                               from kedro.pipeline.pipeline import TRANSCODING_SEPARATOR, _strip_transcoding                               
                                                                                                                                           
                    WARNING  Failed to load kedro_viz.launchers.cli commands from EntryPoint(name='kedro-viz',                 utils.py:379
                             value='kedro_viz.launchers.cli:viz_cli', group='kedro.global_commands'). Full exception: No                   
                             module named 'toposort'                                                                                       
Usage: kedro [OPTIONS] COMMAND [ARGS]...
Try 'kedro -h' for help.

Error: No such command 'viz'.
I have kedro and viz installed
Copy code
pip list | grep kedro
kedro                     0.19.6
kedro-datasets            1.8.0
kedro-viz                 7.1.0
d
if you type :
which pip
which kedro
which python
what do you get?
t
Copy code
(portfolio) ➜  project (main) which pip
/opt/miniconda3/envs/portfolio/bin/pip
(portfolio) ➜  project (main) which kedro
/opt/miniconda3/envs/portfolio/bin/kedro
(portfolio) ➜  project (main) which python
/opt/miniconda3/envs/portfolio/bin/python
(portfolio) ➜  project (main)
d
and if you type just
kedro
?
t
Copy code
[05/30/24 10:59:42] INFO     Using `conf/logging.yml` as logging configuration. You can change this by setting the          __init__.py:249
                             KEDRO_LOGGING_CONFIG environment variable accordingly.                                                        
[05/30/24 10:59:46] WARNING  /opt/miniconda3/envs/portfolio/lib/python3.8/site-packages/kedro_viz/models/flowchart.py:13:   warnings.py:109
                             KedroDeprecationWarning: 'TRANSCODING_SEPARATOR' has been moved to                                            
                             'kedro.pipeline.transcoding', and the alias will be removed in Kedro 0.20.0                                   
                               from kedro.pipeline.pipeline import TRANSCODING_SEPARATOR, _strip_transcoding                               
                                                                                                                                           
                    WARNING  Failed to load kedro_viz.launchers.cli commands from EntryPoint(name='kedro-viz',                 utils.py:379
                             value='kedro_viz.launchers.cli:viz_cli', group='kedro.global_commands'). Full exception: No                   
                             module named 'toposort'                                                                                       
Usage: kedro [OPTIONS] COMMAND [ARGS]...

  Kedro is a CLI for creating and using Kedro projects. For more information,
  type ``kedro info``.

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

Global commands from Kedro
Commands:
  info     Get more information about kedro.
  new      Create a new kedro project.
  starter  Commands for working with project starters.

Project specific commands from Kedro
Commands:
  catalog   Commands for working with catalog.
  ipython   Open IPython with project specific variables loaded.
  jupyter   Open Jupyter Notebook / Lab with project specific variables...
  micropkg  (DEPRECATED) Commands for working with micro-packages.
  package   Package the project as a Python wheel.
  pipeline  Commands for working with pipelines.
  registry  Commands for working with registered pipelines.
  run       Run the pipeline.
d
Okay that’s interesting
Okay can you upgrade kedro viz to the latest version
the toposort issue was fixed here https://github.com/kedro-org/kedro-viz/pull/1819
t
For python 3.8, i guess 7.1.0 is the maximum supported version
d
ah is that a hard requirement?
you’ve only got 5 months till it’s EOL? https://devguide.python.org/versions/
t
Yeah its an already working project which i am onboarded recently
j
Did you check
pip list | grep toposort
Have tired installing toposort manually
pip install toposort
and re run it.
t
@Jitendra Gundaniya that fixed the issue, thanks a ton 1000
👍 2
d
@Jitendra Gundaniya it’s only going to be a problem for 5 months but you could release with this?
Copy code
toposort; python_version == '3.8.*'
j
Thanks @datajoely I will chat with @Rashida Kanchwala on this.
👍 1
n
Is it a Python version problem? I think this is because Kedro drop
toposort
recently,
kedro-viz
assume
toposort
from
kedro
but it should actually put it in the requirements if
toposort
is imported inside viz codebase
r
hi team, we have already done this. and it was released in kedro-viz 9.0.1; however Kedro-viz dropped support for Python 3.8 recently. So you can't download the latest kedro-viz if you are on Python 3.8
👍 1
👍🏼 1
d
👀 1