I would like to use emacs for learning python with numpy. How can I proceed ? Have seen other using Jupyter but would prefer using emacs instead.

Would it be possible to have a simple example using numpy that I can execute from emacs ?

  • Here you can find a nice blog article about using Emacs as Jupyter notebook alternative. I would recommend using org-mode, as the 'IDE' functionality can be fixed (I will probably write more about that somewhere soon) May 30, 2023 at 8:44
  • Would look forward to read about it.
    – Dilna
    May 30, 2023 at 9:54
  • Would you provide an org-mode example that uses operations from numpy that I can run ?
    – Dilna
    May 30, 2023 at 10:10

1 Answer 1


Org mode has the best support in emacs. You will need Babel to create and execute snippets of python code that will print the results on the subsequent lines. Images can be displayed as well, but need to be saved to a file first (it's minor inconvenience, but it provides greater portability). This route will be more challenging initially than something like jupyter notebook, but you will be able to use git to version control your "notebooks" (.org files), because at the end of the day org mode file is just a plain text file (as opposed to large json documents saved as .ipynb).

You theoretically could run jupyter notebooks in emacs, as well with packages like ein or emacs-jupyter, but it won't be a pleasant experience (I've tried only ein, not sure what emacs-jupyter is like).

Python examples: https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-python.html

  • Right. Did ein and emacs-jupyter but did not see them becoming valuable tools for many programmers.
    – Dilna
    May 30, 2023 at 19:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.