1

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 ?

3
  • 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) Commented May 30, 2023 at 8:44
  • Would look forward to read about it. Commented May 30, 2023 at 9:54
  • Would you provide an org-mode example that uses operations from numpy that I can run ? Commented May 30, 2023 at 10:10

1 Answer 1

0

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

1
  • Right. Did ein and emacs-jupyter but did not see them becoming valuable tools for many programmers. Commented 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.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.