Pyenv plugin to create a jupyter kernel for every installed pyenv version. Inspiration from this gist
$ git clone https://github.com/aiguofer/pyenv-jupyter-kernel $(pyenv root)/plugins/pyenv-jupyter-kernel
New kernels are automatically installed for every new version and virtualenv that you install. However, if you want to install the kernel for the current version (if using multiple versions, the top one) you can run:
$ pyenv register-kernel
Or to specify a specific version:
$ pyenv register-kernel <version_name>
To create a kernel for all versions you've already created in pyenv:
pyenv versions --bare | grep -v "/" | xargs -L 1 pyenv register-kernel
To start up an interactive shell using the kernel for your currently active pyenv
version:
jupyter console --kernel=$(pyenv version-name)
It might be useful to add an alias in your init file:
alias ipy="jupyter console --kernel=$(pyenv version-name)"