From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Doug Davis Newsgroups: gmane.emacs.help Subject: Re: Pyenv and Jupyter integration with emacs. Date: Fri, 12 Mar 2021 21:43:29 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35845"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin) Cc: Skip Montanaro , help-gnu-emacs To: Hongyi Zhao Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 13 03:44:08 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lKuG8-0009BQ-5F for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 13 Mar 2021 03:44:08 +0100 Original-Received: from localhost ([::1]:48690 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKuG7-0002Em-7i for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 12 Mar 2021 21:44:07 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59260) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lKuFc-0002ER-Ky for help-gnu-emacs@gnu.org; Fri, 12 Mar 2021 21:43:36 -0500 Original-Received: from out1-smtp.messagingengine.com ([66.111.4.25]:56451) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lKuFa-0002u8-KI for help-gnu-emacs@gnu.org; Fri, 12 Mar 2021 21:43:36 -0500 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 2439A5C0099; Fri, 12 Mar 2021 21:43:32 -0500 (EST) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Fri, 12 Mar 2021 21:43:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ddavis.io; h= from:to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-type; s=fm1; bh=/vsEY4ndxwHy8rrs92hFK1NW+f OHaBPGn4sDPZRxNtg=; b=awDFCeCqCXKGExrPwVqlXJgygabK7YJEMgs8yB9j+g XR12EzCC4L42kVIHXLOm/4tXGwgay+o+8TopepZbKCs5KJ1A+j7qZpkKgAJIWR0i DUNPepP48q/TwQYYr/4/FELm2AXk3YKxyMQ+CVxqyvhltHgYYAQHsGlwK3Ipgyt1 H6YY5BDRq+Es0nLd3FeU2ovENxAQ6B+O9GhTjXYrkNaIZe+6wahuQTv1MWqUpiZr 0LPotem2vnDmnXdAp85+j7Lm/mOzkNyQmN72xzVFy+zJROtgND0cabgbjE20CZyl WkVoi5ugorm1aw5j39O8PDVjENokR8MI8krop191YcnA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=/vsEY4 ndxwHy8rrs92hFK1NW+fOHaBPGn4sDPZRxNtg=; b=WqC+ELvLt8H5AN3K/KOyzY N0TEXYu9wJFJ+JNtiSSj76ADj1zHIdEh3avQgQs1oyvYFzzwHN/wK8DxTYBupSy9 4llPjSR4YM5aGLWiQsiOmufM1qtwVnSLFcL1zwyn1fw6NdbEf0WHuvqhvibu6Dmo QRDM1ttCcC5nsOVHwh7wIFyCAkc9e+bigTmFo6mcWMpT6fmzZoBHa8X5u0wkb94a +TlGQUAq1ZUZKY3oJEKqbbfA6wH2MqFF2MAai+/lV+S1wxLLl7VLcH9yNWwyNMC+ 91Tjx3WZqSYbceQk8M66rK9wSzH/sCCqi8G/fqiMt6Pj6iJc6wVHUcvBgP88tUbQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledruddvfedghedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpeffohhughcu ffgrvhhishcuoeguuggrvhhishesuggurghvihhsrdhioheqnecuggftrfgrthhtvghrnh epfeeutefghfeffefhhfettedvtdevteelvdeileeugfefhfeitdfhtdejfeejgfetnecu ffhomhgrihhnpeguuggrvhhishdrihhopdhrvggrughthhgvughotghsrdhiohenucfkph epvdegrdelkedrjeeirdektdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhep mhgrihhlfhhrohhmpeguuggrvhhishesuggurghvihhsrdhioh X-ME-Proxy: Original-Received: from localhost (c-24-98-76-80.hsd1.ga.comcast.net [24.98.76.80]) by mail.messagingengine.com (Postfix) with ESMTPA id 62E721080054; Fri, 12 Mar 2021 21:43:31 -0500 (EST) In-Reply-To: (Hongyi Zhao's message of "Sat, 13 Mar 2021 08:52:01 +0800") Received-SPF: pass client-ip=66.111.4.25; envelope-from=ddavis@ddavis.io; helo=out1-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:128403 Archived-At: Hongyi Zhao 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