Does anyone know a way to reuse that trick for jupyter notebooks? So that one could share a notebook declaring it's dependencies .
If feels a little bit less elegant, and you don't get access to uv's caching goodness, but that'd more or less achieve what you're looking for!
uv tool run jupyter lab
and then put !uv pip install my_cool_library
!uv pip install other_library
...
in the first cell. Now you get full uv caching goodness.I was more dreaming of something where I can send a notebook to someone not technical, and that just bootstraps on the fly an env with jupyter and the required dependencies.