help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pyenv and Jupyter integration with emacs.


From: Doug Davis
Subject: Re: Pyenv and Jupyter integration with emacs.
Date: Fri, 12 Mar 2021 21:43:29 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin)

Hongyi Zhao <hongyi.zhao@gmail.com> writes:

> Some new discoveries that I stumbled upon:
>
> https://ddavis.io/posts/emacs-python-lsp/

Hey, that's my post! glad it was discovered :)

It targets a work flow that I think is on the opposite side of the
Python spectrum with respect to the Jupyter project, that is, regular
Python development (not so much experimentation, which is what I do with
Jupyter, playing around with prototypes and just getting some thoughts
typed out).

I use Emacs + lsp-mode (I still tinker with Eglot even though the blog
post is focused on lsp-mode) for pretty standard Python development,
especially when I want to navigate around a project.

That said, here's a bit of a rundown of my Jupyter usage as an Emacs
devotee: I have used EIN before (with help from pyenv + pyvenv, which I
walk through in the blog post). If you have jupyter installed in a
particular virtual environment, in Emacs execute `M-x pyvenv-workon' to
activate that environment, then `M-x ein:jupyter-server-start' to start
EIN. As much as I love to stay in Emacs, I'm not a heavy
notebooks-in-Emacs person. I typically use Emacs to work on code living
in a Python module and use:

%load_ext autoreload
%autoreload 2

In a web browser hosted Jupyter notebook to get changes from code I'm
editing in Emacs. More info about autoreload here:
https://ipython.readthedocs.io/en/stable/config/extensions/autoreload.html

This has given me a bit of motivation to perhaps give the
notebook-in-Emacs workflow a shot again.

Cheers,
Doug



reply via email to

[Prev in Thread] Current Thread [Next in Thread]