Skip to content

sjkuntz/spacemacs-jupyter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jupyter layer

Table of Contents

Description

A spacemacs layer for Jupyter REPLs and their integration with org-mode, including integration with org-babel and exporting of org files to .ipynb. Currently a fork of benneti’s jupyter layer, though I have not decided if I wish to keep this as a personal private layer.

Features

Includes the following packages:

Install

To use this configuration layer, add it to your ~/.spacemacs. You will need to add jupyter to the existing dotspacemacs-configuration-layers list in this file.

Additionally you need to have jupyter available in your PATH.

The jupyter package also provides integration with org-babel via ob-jupyter. To use the kernels in jupyter just add (jupyter . t) to your org-babel-load-languages list as the last element. If no auto-completion is used adding to the variable is sufficient as spacemacs provides a hook that loads it the first time org-mode is started.

An example would be adding

(with-eval-after-load 'org
  (setq org-babel-load-languages
        (append org-babel-load-languages
                '((latex . t)
                  ;; jupyter has to be the last element
                  (jupyter . t))))
  ;; Execute load languages once, else autocompletion will only work in the
  ;; second org file one opens
  (spacemacs//org-babel-do-load-languages))

to your dotspacemacs/user-config.

pyvenv

Out of the box, the jupyter REPL should follow the path to the conda environment set by pyvenv. In the event that this does not work, try adding the following line to your dotspacemacs/user-init.

(add-hook 'pyvenv-post-activate-hooks (lambda() (jupyter-available-kernelspecs t)))

This guarantees that pyvenv will affect the path to the jupyter kernel.

Key bindings

As of this upload, I have removed all key bindings except for the following.

Key BindingDescription
SPC a j jStart new REPL
SPC a j rStart new REPL
SPC a j cConnect to REPL

About

Spacemacs layer for https://github.com/dzop/emacs-jupyter

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Emacs Lisp 100.0%