From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Skip Montanaro Newsgroups: gmane.emacs.help Subject: Re: Pyenv and Jupyter integration with emacs. Date: Thu, 11 Mar 2021 09:28:05 -0600 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32893"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs To: Hongyi Zhao Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 11 17:13:05 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 1lKNvt-0008Sa-B5 for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 11 Mar 2021 17:13:05 +0100 Original-Received: from localhost ([::1]:49488 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKNvs-0006ky-Cz for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 11 Mar 2021 11:13:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52254) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lKNDX-0003E6-3A for help-gnu-emacs@gnu.org; Thu, 11 Mar 2021 10:27:15 -0500 Original-Received: from mail-yb1-xb32.google.com ([2607:f8b0:4864:20::b32]:37452) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lKNDU-00087n-P2 for help-gnu-emacs@gnu.org; Thu, 11 Mar 2021 10:27:14 -0500 Original-Received: by mail-yb1-xb32.google.com with SMTP id p193so22103520yba.4 for ; Thu, 11 Mar 2021 07:27:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=j6bEk/Xi61MFGSbzt9KkP1ZOymdU+r27kcYDoOooTww=; b=mQjzrKOSL8+Ytrn8+aI1iIznDqBQ+IwPpZF9Agu7KJpRCbWQozRzQv4b7UctZPWH9V RdOMYS0o4smUw0Hyw8RAa9rAgbCwS0HAUW+OjHXQCJ9ncvFe72EAlWD8u6PmfQaZ+LbB WfZcLE3W02WiyhsPuaYRV5671ECsyrCf8TNuWiwWgqRDVL0j1JeKJaRmnNZ7vvMpxFTG t0gDp8+gt68owuzVw3z1T39CYFfQiyPYopaW46d6aqfm0T+iegg33vjoOKX5IbEaXuWY 2A6IOz/cXth0JK0o1NeqXFiIVwq4U2QA9PD9kgLg/Xe/L3KssmKjjx4b7aB3QaTzWXIR sDzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=j6bEk/Xi61MFGSbzt9KkP1ZOymdU+r27kcYDoOooTww=; b=H5yxRFQdWuEsVMHinbpqk8G8Ro2hlIqdzu3MxZk3U7Qxb79JH8bcPB1/O4ApbwwU+2 FGkY8UiiQb429gqPtHC7CTFBH4K+kGdKvPlcLqSff8+kX/DZnTLsFAJTuSYbyuMdfPVy 3bf1RrSu3YOzIdQ9lf06wM0tnFHbqQMGoFpp+nJ9wwJjSpSJuTh7Ro4R/otZlJjFVJZu 0Ihtz+gkb4o4oqk0y209VdJd1aUy4fzFoqoaiPItzKKpIejkqpD1GNhkCVL1LiF9HBog BUHLfLjG9kWpCAbQXmjqbiEOkdbYZ4fQ13rKXTuhajLwgVpiL5JPEbcg97h+jISsXrR2 P3ZA== X-Gm-Message-State: AOAM530w1FcI+lyClUkc/XSCfaKZ8/pE3D8FiP55EBL1xmusXLWc5+aF ND2Hw8qerjKQ0im5p1A+V/Vud3HEBDdPXjeSsjxFcr0= X-Google-Smtp-Source: ABdhPJzH7817y+dlX0BnLfWv3UUz7c90d00ZrpwUQl5dsvLoHKnEBUdmERXsnzkRMcOJMFBSL2ZFginX+2c9A/NAO5Y= X-Received: by 2002:a25:5542:: with SMTP id j63mr12529103ybb.490.1615476431459; Thu, 11 Mar 2021 07:27:11 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::b32; envelope-from=skip.montanaro@gmail.com; helo=mail-yb1-xb32.google.com X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, NUMERIC_HTTP_ADDR=1.242, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, WEIRD_PORT=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.23 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:128391 Archived-At: > > I still don't quite understand what you wrote above. OTOH, from my > intuitive point of view, it seems that emacs-ipython-notebook is more > powerful then emacs-jupyter. > I just picked one and tried it. I chose it in large part because "jupyter" is a newer name than "ipython." I found the README file unhelpful and just stumbled my way to connecting to an existing kernel. As for the file, when you run "jupyter notebook" it creates a number of files in ~/.local/share/jupyter/runtime and prints a bit of output to the terminal, for example: To access the notebook, open this file in a browser: file:///home/skip/.local/share/jupyter/runtime/nbserver-533322-open.html Or copy and paste one of these URLs: http://localhost:8888/?token=5de6661699de63f03da52dd1bdf6a4f18f8cb2119373d6e0 or http://127.0.0.1:8888/?token=5de6661699de63f03da52dd1bdf6a4f18f8cb2119373d6e0 None of those URLs is actually what jupyter-connect-repl requires. Here are the files just created when I restarted my notebook server and the two kernels just now: % ls -ltr ~/.local/share/jupyter/runtime/ total 120 ... -rw-r--r-- 1 skip skip 287 Mar 11 09:19 nbserver-533322.json -rw-r--r-- 1 skip skip 673 Mar 11 09:19 nbserver-533322-open.html -rw------T 1 skip skip 263 Mar 11 09:21 kernel-9e8ca820-639b-44e8-9322-6570db2a9a21.json -rw------T 1 skip skip 263 Mar 11 09:21 kernel-2b4f57f1-466c-44c6-9871-c9bcb007e3ca.json The first two files are the ones the notebook command created. The second two files are the result of restarting the two kernels. Those are the files jupyter-connect-repl needs. As I indicated, this is not clear from the README file. There is no good way to guess which of the kernel-*.json files you want to use for the connect operation because the kernel_name field is empty. If you are only running a single kernel that's okay I suppose. It would be nice if there was an obvious way to name kernels when opening an existing ipynb file or when (re)starting the associated kernel. It doesn't appear there is, however. Rereading your original note, I didn't see any indication that you'd tried any of the three options or had a perceived preference. Had you expressed a preference at that point, I would likely have given it a try. Skip