Skip to content

uv init --build-backend scikit followed by uv run --with jupyter jupyter lab has counterintuitive behaviour concerning rebuilds #15701

@rimathia

Description

@rimathia

Question

This is probably just a documentation request. My first step is
uv init --build-backend scikit
which works as expected, next I'm starting a jupyter notebook using
uv run --with jupyter jupyter lab
which also works as expected, it builds the C++ extension and I can now create a notebook (using the default kernel) where I can load the C++ python extension. This is a massive improvement over any other tool or workflow that I've tried.
However, I haven't been able to find out the right way to invoke uv to create a jupyter kernel such that it rebuilds the C++ extension if the source files have changed. One way which does work is
uv clean && rm -r .venv && uv run --with jupyter jupyter lab
but that is certainly not the way to do it.

Maybe the uv init --build-backend scikit could document the right invocations (for example in the README.md which it creates which is empty by default) or it could print the two or three most frequent workflow commands to the command line after it has created the environment.

Platform

Darwin 24.5.0 arm64

Version

uv 0.7.19 (38ee6ec 2025-07-02)

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionAsking for clarification or support

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions