bluss / pyproject-local-kernel

Python Jupyter kernel using pyproject environment manangers like Rye, Uv, PDM, Poetry, Hatch etc.
https://bluss.github.io/pyproject-local-kernel/
MIT License
19 stars 0 forks source link

Not able to find pyproject-local-kernel in kernel dropdown #17

Closed JiangShen07 closed 1 month ago

JiangShen07 commented 1 month ago

Hello, thx for developing this! I tried following commands in my VSCode terminal before opening up a ipynb but still couldn't find pyproject-local-kernel. I've installed Python 3.8.19 in this project using rye. Would you know why?

rye add pyproject_local_kernel --git=https://github.com/bluss/pyproject-local-kernel rye add --sync ipykernel rye add jupyterlab rye sync

image

bluss commented 1 month ago

This project is made for jupyterlab and I hadn't even tried in vscode or vscodium previously.

In code you can select a local virtualenv. I would recommend using that instead if possible - set up the project using rye or uv, then select the local .venv in code as the python environment to use, it should work well.

I see that you installed jupyterlab in your instructions, but still use code. jupyterlab is not used in your setup, so it shouldn't factor into this?

How to make pyproject-local-kernel work in code?

bluss commented 1 month ago

This package works with code's jupyter extension and I have added instructions for code in the FAQ. As noted, just using code's support for virtualenvs is usually enough though, then you don't need this package.