From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 2PjUNqmZ6mOE2QAAbAwnHQ (envelope-from ) for ; Mon, 13 Feb 2023 21:12:25 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id aDIGN6mZ6mPMMwEAauVa8A (envelope-from ) for ; Mon, 13 Feb 2023 21:12:25 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9C60911222 for ; Mon, 13 Feb 2023 21:12:25 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pRfAq-0006Xi-DT; Mon, 13 Feb 2023 15:11:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRfAo-0006XX-92 for emacs-orgmode@gnu.org; Mon, 13 Feb 2023 15:11:38 -0500 Received: from sender4-op-o12.zoho.com ([136.143.188.12]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRfAm-0007Tq-Le for emacs-orgmode@gnu.org; Mon, 13 Feb 2023 15:11:38 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1676319092; cv=none; d=zohomail.com; s=zohoarc; b=CZ+GMeiZwPuA3JfYl9oQydpBhC0Jea5DttM3+G1ZQfcioWaG4CbdGygfo6shuDMikWCsl2nilWQkrN73Zl2nRewFz9E6SFHyw8nKsLRmHsNGa1oNV8FlkDHj33jP1ms8uPYNUK8PAvhlnMErwieF696dXlAgvC6igyRI/kn8LeE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676319092; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=V3RzKXnDioxLFugpaD05lUyP/4QgU4OBmKcq4fpOLsk=; b=Rstiq/3oITIXgBy7+2LqMSYDCjiirnFXoOrushLCIdA+4hHZiXsY2iea8WHZ+TjASzq9Yju8Qkh/8YKpEx3VNcGOgYdf5tj3Z7xCxXA2l78L18yD9o/LkOeddg9bJneYbKwVKBqX8D2GaoAOU+81Se4g7kbVStBmDNRokgoh5DE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=excalamus.com; spf=pass smtp.mailfrom=matt@excalamus.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1676319092; s=zmail; d=excalamus.com; i=matt@excalamus.com; h=Date:Date:From:From:To:To:Cc:Cc:Message-ID:In-Reply-To:References:Subject:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=V3RzKXnDioxLFugpaD05lUyP/4QgU4OBmKcq4fpOLsk=; b=HEme4tMwfGtXD0Zqpm5nxc8QacN+rxlPNVFS0ovrzK8fcbc6Ykf6q0RCgVqKdC5f kp/xe2tiZvqDdXUPOhZD3y8wd9frPVpUrSEfwh9dS3oYhjCkzBpdQScp/5MWrs2dtnM 2F/qsvPnxAUyjOh3uG25SFCGS3k7TwLAb469fdCk= Received: from mail.zoho.com by mx.zohomail.com with SMTP id 1676319091631514.3960383576897; Mon, 13 Feb 2023 12:11:31 -0800 (PST) Date: Mon, 13 Feb 2023 15:11:31 -0500 From: Matt To: "Jack Kamm" Cc: "emacs-orgmode" Message-ID: <1864c676b9f.e1bae673679825.2955884247216895930@excalamus.com> In-Reply-To: <87357a2r27.fsf@gmail.com> References: <186283d230a.129f5feb61660123.3289004102603503414@excalamus.com> <87a61j3orj.fsf@gmail.com> <1864701b4b8.e37160d6373275.4308190093579612690@excalamus.com> <87357a2r27.fsf@gmail.com> Subject: [BUG] conda doesn't work in ob-shell sessions MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Importance: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail Received-SPF: pass client-ip=136.143.188.12; envelope-from=matt@excalamus.com; helo=sender4-op-o12.zoho.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=excalamus.com header.s=zmail header.b=HEme4tMw; arc=pass ("zohomail.com:s=zohoarc:i=1"); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=2; s=key1; d=yhetil.org; t=1676319145; a=rsa-sha256; cv=pass; b=WPkGbBgEhgMfhqxb53FQgc1W03MkqEuWKimPl9dcwAYizRMFBU2vVufrSzJ4PeuYhRfmIz OEx9ReOBs+OsoRd8N1aQfHWTLQiw/qeH7DPOtGsDbLr+xgmiKEnIp+fA7MdSvCWcsvUS8F o/N+kiio8neVjObEhgYogbPZxZMX7wEdErwDdxHlN40SkHsVgJVjSjYDo1ljeoILyKxMnB LrkrebmXPwgiSQFdqy+qd+NncQ4uJndHV1uZFhdYh/TzHH0YzU14OMS4INS/5n4jLkvmNm 6obFzcfJVHBjnEgIZ2JFc5mHNKbdU/pKp35hm1/R9gxfUIL07cLYsMBmkCYnTA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1676319145; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=V3RzKXnDioxLFugpaD05lUyP/4QgU4OBmKcq4fpOLsk=; b=lTwtXUnklCGid2cB+HFi7dUWFAKXsrlIf5tY4qi1k4x1zW1bXBxxmKF9kBZbh41b5DzGnL HnCBN1/vboniZTSqKGHkK2NsfSthHN98RQK8BzuyjSu4PYiKNQoRkd6NWLUb3miPeVhALt XwrMTG9Bo34RmVGD2Qtl1lYM1lLpAijyuajAhzWoxawHURniiGX5LLbzMp9ajD1pr2m1yj zRzAZ+8xgtxelRfxO4xMKdpPaZOeT1seKBcefcmHujQ/iZKzflY/PT2mnxx3VRMjWGxiFL eGPnE07BwlUdx7ED53/78HTl9S+BhzFSoWeYBz/0UEyI9SLSb4+9XoKbHPJ8Ug== X-Migadu-Spam-Score: -6.86 X-Spam-Score: -6.86 X-Migadu-Queue-Id: 9C60911222 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=excalamus.com header.s=zmail header.b=HEme4tMw; arc=pass ("zohomail.com:s=zohoarc:i=1"); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=none X-TUID: 2PJpUQxhD/DX ---- On Sun, 12 Feb 2023 22:16:16 -0500 Jack Kamm wrote --- > But I also noticed another prompt-related issue: conda doesn't seem to > work in ob-shell sessions anymore. That is a bigger problem for my use > case. Could you elaborate? It looks like conda has a new init (from what I remember) which requires users to run a `conda init ' command in order to create a new environment. For example, I needed to run `conda init bash.' This added garbage to my .bashrc which automatically enabled the base environment. I was able to do this from ob-shell, however it required me to reload the shell (I reloaded Emacs to be sure I got the latest environment variables). After this, I was able to create and activate a new conda environment. 1. M-x shell 2. Executing the following in sequence: #+begin_src emacs-lisp (org-version nil t) #+end_src #+RESULTS: : Org mode version 9.6.1 (release_9.6.1-250-ge6353d @ /home/user/Projects/org-mode/lisp/) #+begin_src emacs-lisp (org-babel-do-load-languages 'org-babel-load-languages '((shell . t))) #+end_src #+begin_src sh :session *shell* :results output conda create --yes --name myenv python=3.9 #+end_src #+RESULTS: #+begin_example Downloading and Extracting Packages Preparing transaction: done Verifying transaction: done Executing transaction: done To activate this environment, use conda activate myenv To deactivate an active environment, use conda deactivate #+end_example #+begin_src sh :session *shell* :results output conda activate myenv #+end_src #+RESULTS: #+begin_src sh :session *shell* :results output which python #+end_src #+RESULTS: : /home/user/miniconda3/envs/myenv/bin/python The *shell* buffer's prompt also showed the expected [myenv] prefix.