Skip to content

Latest commit

 

History

History
41 lines (27 loc) · 1.09 KB

README.md

File metadata and controls

41 lines (27 loc) · 1.09 KB

pyenv-jupyter-kernel

Pyenv plugin to create a jupyter kernel for every installed pyenv version. Inspiration from this gist

Installation

$ git clone https://github.com/aiguofer/pyenv-jupyter-kernel $(pyenv root)/plugins/pyenv-jupyter-kernel

Usage

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)"