# Jupyter integration with emacs

**URL:** <https://discourse.julialang.org/t/jupyter-integration-with-emacs/21496>\
**Category:** Tooling\
**Tags:** jupyter, repl, emacs\
**Created:** [March 5, 2019, 3:09pm UTC](https://discourse.julialang.org/t/jupyter-integration-with-emacs/21496 "2019-03-05T15:09:03Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![non-Jedi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/non-jedi/32/3645_2.png) [@non-Jedi](https://discourse.julialang.org/u/non-Jedi)\
**Post date:** [March 5, 2019, 3:09pm UTC](https://discourse.julialang.org/t/jupyter-integration-with-emacs/21496/1 "2019-03-05T15:09:03Z")

</div>

I’ve mentioned in a thread or two that I’ve been using the excellent [jupyter emacs package](https://github.com/dzop/emacs-jupyter) with Julia for several months now, so I thought it might be a good idea to make a topic to highlight the package. For me, this package has worked very well and replaced [julia-repl](https://github.com/tpapp/julia-repl) as my REPL for julia within emacs and replaced [ob-ipython](https://github.com/gregsexton/ob-ipython) and [ein](https://github.com/millejoh/emacs-ipython-notebook) for notebook-style work in emacs (I never actually got ob-julia working, and it isn’t currently maintained).

The cool thing about this package is that it’s designed as a general-purpose interface to jupyter from within emacs which the author has simply built a REPL and org-mode integration on top of. This means that unlike ob-ipython and ein, it doesn’t make a lot of python-specific assumptions about jupyter. Further, the integrations are customizable per-language, and the author is actually a julia user, so out of the box the REPL has niceties like latex substitution, rich text formatting of docstring markdown, and the prompt actually changing to e.g. `help?>` when in package, help, or shell modes.

Anyway, thought it might be worth posting on a Julia tool for emacs that the community might not be very aware of.

---

<div class="post-metadata">

**Author:** ![Mason](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mason/32/2423_2.png) [@Mason](https://discourse.julialang.org/u/Mason)\
**Post date:** [March 7, 2019, 3:52pm UTC](https://discourse.julialang.org/t/jupyter-integration-with-emacs/21496/2 "2019-03-07T15:52:25Z")

</div>

It’s especially important that it gets linked to because it never shows up on google at least for me unless I include the author’s name. Not sure why that is.

---

<div class="post-metadata">

**Author:** ![dave.f.kleinschmidt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dave.f.kleinschmidt/32/55_2.png) [@dave.f.kleinschmidt](https://discourse.julialang.org/u/dave.f.kleinschmidt)\
**Post date:** [April 26, 2019, 5:56pm UTC](https://discourse.julialang.org/t/jupyter-integration-with-emacs/21496/3 "2019-04-26T17:56:40Z")

</div>

FWIW I googled “emacs jupyter” today and it comes up first (even in a private mode window).

---

<div class="post-metadata">

**Author:** ![dave.f.kleinschmidt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dave.f.kleinschmidt/32/55_2.png) [@dave.f.kleinschmidt](https://discourse.julialang.org/u/dave.f.kleinschmidt)\
**Post date:** [April 26, 2019, 7:29pm UTC](https://discourse.julialang.org/t/jupyter-integration-with-emacs/21496/4 "2019-04-26T19:29:25Z")

</div>

This is seriously cool. Anyone care to share their .emacs file for using this to provide interaction with .jl files?

---

<div class="post-metadata">

**Author:** ![ffevotte](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ffevotte/32/6587_2.png) [@ffevotte](https://discourse.julialang.org/u/ffevotte)\
**Post date:** [April 27, 2019, 11:32am UTC](https://discourse.julialang.org/t/jupyter-integration-with-emacs/21496/5 "2019-04-27T11:32:28Z")

</div>

I had a few difficulties installing it, so maybe this write-up will be all the more useful.

Here is how things go if everything works well:

1. Installation:

2. Usage:

Here is what a small example session looks like:

- I evaluated the function first using C-M-x
- then the `hello()` call in the file using C-cC-c; this opened the “output” window at the bottom right
- I manually typed `hello()` in the REPL (top right wndow)
- I pressed M-i with point on `println`; this opened the bottom left help window.

 ![jupyter-emacs](https://global.discourse-cdn.com/julialang/original/3X/0/1/01e7beeab776a5c285333ba552e799fef44bb920.png)

  

* * *
  

Now, here are the issues I had:

- **“Modules are not supported” at step 2** : this is because your Emacs should support [dynamic modules](https://www.gnu.org/software/emacs/manual/html_node/elisp/Dynamic-Modules.html). It wasn’t the case for my out-of-the-box Emacs version on Debian and I had to manually rebuild and reinstall an Emacs version configured using `--with-modules`.

- **“No kernelspecs available” at step 2** : if, like me, you let `IJulia` install jupyter automagically for you, chances are that the `jupyter` command is not in your `PATH`. You’ll have to add the correct jupyter installation directory to your `PATH` for Emacs to be able to find it.

---

<div class="post-metadata">

**Author:** ![d1cker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/d1cker/32/9816_2.png) [@d1cker](https://discourse.julialang.org/u/d1cker)\
**Post date:** [July 2, 2019, 7:35am UTC](https://discourse.julialang.org/t/jupyter-integration-with-emacs/21496/6 "2019-07-02T07:35:04Z")

</div>

Thanks for the guide @ffevotte.  
I had to modify exec-path as well. (add-to-list 'exec-path “/home/dicker/.julia/conda/3/bin”)

---

<div class="post-metadata">

**Author:** ![BBM](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bbm/32/18317_2.png) [@BBM](https://discourse.julialang.org/u/BBM)\
**Post date:** [September 30, 2020, 9:38pm UTC](https://discourse.julialang.org/t/jupyter-integration-with-emacs/21496/7 "2020-09-30T21:38:16Z")

</div>

With my extension (same name different functionality)

[https://github.com/burakbayramli/emacs-jupyter](https://github.com/burakbayramli/emacs-jupyter)

you could run Python code right inside a markdown buffer. TeX is also supported.

---

<div class="post-metadata">

**Author:** ![arif](https://avatars.discourse-cdn.com/v4/letter/a/74df32/32.png) [@arif](https://discourse.julialang.org/u/arif)\
**Post date:** [February 19, 2021, 11:08am UTC](https://discourse.julialang.org/t/jupyter-integration-with-emacs/21496/8 "2021-02-19T11:08:45Z")

</div>

I having an error which is related to `libzmq`. Part of the output looks like this

```julia
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for libzmq... yes
checking for library containing zmq_poller_new... no
configure: incompatible libzmq, building one locally
./configure: line 4054: syntax error near unexpected token `win32-dll'
./configure: line 4054: `LT_INIT(win32-dll shared disable-static)'
make[1]: *** [Makefile:43: configure] Error 2

```
