python jupyter #9

Open
opened 2024-04-29 13:47:56 +02:00 by daniel · 0 comments
Owner

Python Jupyter notebook support

EIN

Usage

  • Open an .ipynb file, press C-c C-o, or,
  • M-x ein:run launches a jupyter process from emacs, or,
  • M-x ein:login to a running jupyter server, or,
  • M-x ein:stop prompts to halt local and remote jupyter services.

emacs org babel (ein . t)

#+BEGIN_SRC ein-python :session localhost
  import numpy, math, matplotlib.pyplot as plt
  %matplotlib inline
  x = numpy.linspace(0, 2*math.pi)
  plt.plot(x, numpy.sin(x))
#+END_SRC

jupyter

Usage

  • M-x jupyter-run-repl launches a new local kernel and displays a REPL buffer.
  • M-x jupyter-connect-repl connects to an existing kernel using the kernel’s connection file, which is supplied by the user, and displays a REPL buffer.

emacs org babel (jupyter . t)

#+begin_src jupyter-python :session foo :kernel jupyter-emacs :async yes

Issues with ob-ipython

# Python Jupyter notebook support - https://martibosch.github.io/jupyter-emacs-universe/ - `ein` Emacs IPython Notebook https://github.com/millejoh/emacs-ipython-notebook - `jupyter` https://github.com/emacs-jupyter/jupyter - `code-cells` https://github.com/astoff/code-cells.el - `ob-ipython` old ## EIN Usage - Open an `.ipynb` file, press `C-c C-o`, or, - `M-x ein:run` launches a jupyter process from emacs, or, - `M-x ein:login` to a running jupyter server, or, - `M-x ein:stop` prompts to halt local and remote jupyter services. emacs org babel `(ein . t)` ``` #+BEGIN_SRC ein-python :session localhost import numpy, math, matplotlib.pyplot as plt %matplotlib inline x = numpy.linspace(0, 2*math.pi) plt.plot(x, numpy.sin(x)) #+END_SRC ``` ## jupyter Usage - `M-x jupyter-run-repl` launches a new local kernel and displays a REPL buffer. - `M-x jupyter-connect-repl` connects to an existing kernel using the kernel’s connection file, which is supplied by the user, and displays a REPL buffer. emacs org babel `(jupyter . t)` ``` #+begin_src jupyter-python :session foo :kernel jupyter-emacs :async yes ``` Issues with `ob-ipython`
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: daniel/emacs#9