How to best configure different kernels with different python virtualenvs (or similar) in different projects and directories?
Instead of installing a separate kernel per virtualenv, I want to install just one versatile “meta-kernel” or “kernel trampoline” that launches the relevant python kernel for the directory that a notebook belongs to. It is conceptually simpler, and it also should work a lot better when working in a team and sharing code.
I’m working on a prototype for that, that will use Rye to manage python versions, dependencies and virtualenv per jupyter(lab) project.
I was inspired by poetry-kernel which is based on the same concept - it’s the same idea, except they use Poetry as the manager. Do you all know other similar projects like this? Any more established ones?
My (extremely short) code is here: GitHub - bluss/ryeish-kernel: Python Jupyter kernel using Rye for reproducible notebooks and it’s a usable proof of concept. (It’s using Rye which itself is up and coming and not really ready.) There’s a directory called example there in the source code, that maybe can help explain how you would use it.