I'm trying out `uv` as a venv backend, and it has ...
# troubleshooting
r
I'm trying out
uv
as a venv backend, and it has been great up until running the
notebook
utility. Some of our notebooks contain an initial cell to
pip install
dependencies to the venv - with
uv
, this no longer works properly because
pip
isn't bundled with the venv, so dependencies are installed to the system Python instead and then cannot be imported later on in the context of the venv Python. I'm keen to avoid
uv
as a direct dependency of our notebooks, so I've been looking at other ways to work around this issue. There is a
--seed
option for uv venv that would make
pip
available in the venv, but this does seem to slow down venv creation a bit, so I can see why this isn't the default in the Meltano implementation. Is there any way to make this configurable, or an alternative approach that might work?
1
e
Yeah, installing uv in the plugin's venv is less than ideal and goes counter to uv's philosophy. If
--seed
had a corresponding env var, it'd be really easy. It's probably worth raising an issue with the Astral folks.
r
installing uv in the plugin's venv is less than ideal and goes counter to uv's philosophy
To clarify, do you mean installing
pip
in the venv here?
e
Oh sorry, installing
pip
is alright.
I'm keen to avoid
uv
as a direct dependency of our notebooks
That would require installing
uv
in the plugin's venv, and that's was trying to refer to.
r
Gotcha, thanks. 👍
https://github.com/astral-sh/uv/issues/7655 They wanted an issue on Meltano's side, that's why I opened https://github.com/meltano/meltano/issues/8796
Sorry to clog up the issues after we had this discussion 😅
e
Thanks for creating it 👍. I also commented on the issue: another option might be to add
pip
to the
pip_url
of the notebook utility. Would that work?
r
Thanks, just testing that out now - I'll reply in the issue
ty 1