Join the Kedro community

Updated 4 weeks ago

Kedro vertex ai plugin installation issue with version constraints

Guys I do have a problem I'm trying to use the kedro vertex ai plugin, but every time I try to do install, it also update kedro to 0.19.9, but the versions limit is "kedro>=0.18.1,<0.19.0". Any suggestions on how to workaround?

J
T
16 comments

hi , kedro-vertexai 0.11 supports kedro>=0.19

it's not clear to me what Python version you're using or what error are you getting, could you clarify?

I just did uv add kedro kedro-vertexai on Python 3.10 and it succeeded to install the latest kedro 0.19.9 and kedro-vertexai 0.11.1

also uv add "kedro>=0.18.1,<0.19.0" kedro-vertexai got me kedro 0.18.14 and kedro-vertexai 0.10.0

Ohh I see, I'll try that, thank you.

I'll probably have some more questions, I'll let you know...

So I had some issues, I'll just report here to see if there was anything related before and if there is any documentated solutions:

  • I tried to create a conda environment with python 3.10, kedro 0.19.9, vertexai 0.11.1, but when I try to run (kedro new --starter=spaceflights-pandas --verbose) I got the following error: (kedro.framework.cli.utils.KedroCliError: Failed to generate project when running cookiecutter.) I did tried to make sure cookiecutter is installed and so on, but I had no success so far.

can you share the full traceback? with --verbose I think the error should be there

Sure I can share it, it follows bellow, the verbose part is because it was required me to add that to "work".

kedro new --starter=spaceflights-pandas --verbose
[10/29/24 13:04:58] INFO     Using '/opt/conda/lib/python3.10/site-packages/kedro/framework/project/rich_logging.yml' as __init__.py:270
                             logging configuration.

Project Name
============
Please enter a human readable name for your new project.
Spaces, hyphens, and underscores are allowed.
 (Spaceflights Pandas): jarvis
Traceback (most recent call last):
  File "/opt/conda/lib/python3.10/site-packages/cookiecutter/utils.py", line 44, in make_sure_path_exists
    Path(path).mkdir(parents=True, exist_ok=True)
  File "/opt/conda/lib/python3.10/pathlib.py", line 1175, in mkdir
    self._accessor.mkdir(self, mode)
PermissionError: [Errno 13] Permission denied: '/home/jupyter/kedroai_plugin/jarvis'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/conda/lib/python3.10/site-packages/kedro/framework/cli/starters.py", line 956, in _create_project
    result_path = cookiecutter(template=template_path, **cookiecutter_args)
  File "/opt/conda/lib/python3.10/site-packages/cookiecutter/main.py", line 182, in cookiecutter
    result = generate_files(
  File "/opt/conda/lib/python3.10/site-packages/cookiecutter/generate.py", line 320, in generate_files
    project_dir, output_directory_created = render_and_create_dir(
  File "/opt/conda/lib/python3.10/site-packages/cookiecutter/generate.py", line 261, in render_and_create_dir
    make_sure_path_exists(dir_to_create)
  File "/opt/conda/lib/python3.10/site-packages/cookiecutter/utils.py", line 46, in make_sure_path_exists
    raise OSError(f'Unable to create directory at {path}') from error
OSError: Unable to create directory at /home/jupyter/kedroai_plugin/jarvis

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/conda/lib/python3.10/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/opt/conda/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/conda/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/conda/lib/python3.10/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/opt/conda/lib/python3.10/site-packages/kedro/framework/cli/starters.py", line 400, in new
    _create_project(project_template, cookiecutter_args, telemetry_consent)
  File "/opt/conda/lib/python3.10/site-packages/kedro/framework/cli/starters.py", line 962, in _create_project
    raise KedroCliError(
kedro.framework.cli.utils.KedroCliError: Failed to generate project when running cookiecutter.
[10/29/24 13:05:07] INFO     Kedro is sending anonymous usage data with the sole purpose of improving the product. No      plugin.py:233
                             personal data or IP addresses are stored on our side. If you want to opt out, set the
                             `KEDRO_DISABLE_TELEMETRY` or `DO_NOT_TRACK` environment variables, or create a `.telemetry`
                             file in the current working directory with the contents `consent: false`. Read more at
                             <a target="_blank" rel="noopener noreferrer" href="https://docs.kedro.org/en/stable/configuration/telemetry.html">https://docs.kedro.org/en/stable/configuration/telemetry.html</a>

kedro new --starter=spaceflights
[10/29/24 13:03:40] INFO     Using '/opt/conda/lib/python3.10/site-packages/kedro/framework/project/rich_logging.yml' as __init__.py:270
                             logging configuration.                                                                                     
cookiecutter.exceptions.RepositoryNotFound: A valid repository for "spaceflights" could not be found in the following locations:
spaceflights
/var/tmp/tmpbqa9_or1/spaceflights
kedro.framework.cli.utils.KedroCliError: Kedro project template not found at spaceflights. Specified tag 0.19.9. The following tags are available: . The aliases for the official Kedro starters are: 
- astro-airflow-iris
- databricks-iris
- spaceflights-pandas
- spaceflights-pandas-viz
- spaceflights-pyspark
- spaceflights-pyspark-viz

Run with --verbose to see the full exception
[10/29/24 13:03:41] INFO     Kedro is sending anonymous usage data with the sole purpose of improving the product. No      plugin.py:233
                             personal data or IP addresses are stored on our side. If you want to opt out, set the                      
                             `KEDRO_DISABLE_TELEMETRY` or `DO_NOT_TRACK` environment variables, or create a `.telemetry`                
                             file in the current working directory with the contents `consent: false`. Read more at                     
                             <a target="_blank" rel="noopener noreferrer" href="https://docs.kedro.org/en/stable/configuration/telemetry.html">https://docs.kedro.org/en/stable/configuration/telemetry.html</a>

the above shows that without --verbose the command doesn't work

note that --starter=spaceflights doesn't work with Kedro 0.19, you used --starter=spaceflights-pandas

but the important error is somewhere else:

PermissionError: [Errno 13] Permission denied: '/home/jupyter/kedroai_plugin/jarvis'

Let check that, quite odd indeed, I'm on a vertex ai workbench notebook, must be something relate to that.

Add a reply
Sign up and join the conversation on Slack