mirror of https://github.com/astral-sh/uv
Set `UV_PYTHON` in Jupyter kernels (#11155)
## Summary It turns out activating the kernel does not change `VIRTUAL_ENV`, so we still install into the environment the Jupyter environment, rather than the project environment. Unfortunately, after this change, we do still show a warning on `uv add`: ``` warning: `VIRTUAL_ENV=/Users/crmarsh/.cache/uv/archive-v0/3bddKDdYXuX2w57Fu6itL` does not match the project environment path `.venv` and will be ignored ``` `uv pip install` works without warning. Closes #11154.
This commit is contained in:
parent
b0e9781da4
commit
2dfeafbaa4
|
|
@ -51,7 +51,7 @@ $ uv add --dev ipykernel
|
||||||
Then, you can create the kernel for `project` with:
|
Then, you can create the kernel for `project` with:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ uv run ipython kernel install --user --name=project
|
$ uv run ipython kernel install --user --env VIRTUAL_ENV $(pwd)/.venv --name=project
|
||||||
```
|
```
|
||||||
|
|
||||||
From there, start the server with:
|
From there, start the server with:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue