From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id oAhpB752T2BeSgAA0tVLHw (envelope-from ) for ; Mon, 15 Mar 2021 15:01:18 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id INk/A752T2DBZwAAB5/wlQ (envelope-from ) for ; Mon, 15 Mar 2021 15:01:18 +0000 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 73D42267C2 for ; Mon, 15 Mar 2021 16:01:17 +0100 (CET) Received: from localhost ([::1]:55802 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lLoia-0002Uf-Bs for larch@yhetil.org; Mon, 15 Mar 2021 11:01:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35636) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lLoh5-0002TT-Hk for emacs-orgmode@gnu.org; Mon, 15 Mar 2021 10:59:43 -0400 Received: from outpost1.zedat.fu-berlin.de ([130.133.4.66]:46517) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lLoh3-0008PD-GQ for emacs-orgmode@gnu.org; Mon, 15 Mar 2021 10:59:43 -0400 Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost.zedat.fu-berlin.de (Exim 4.94) for emacs-orgmode@gnu.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (envelope-from ) id 1lLoh0-0026D3-Nc; Mon, 15 Mar 2021 15:59:38 +0100 Received: from 130-133-144-203.mna.fu-berlin.de ([130.133.144.203] helo=hornfels) by inpost2.zedat.fu-berlin.de (Exim 4.94) for emacs-orgmode@gnu.org with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (envelope-from ) id 1lLoh0-001fyc-Fu; Mon, 15 Mar 2021 15:59:38 +0100 From: "Loris Bennett" To: Org Mode Mailing List Subject: Changing the environment before calling source block? Date: Mon, 15 Mar 2021 15:59:37 +0100 Message-ID: <87ft0wea3q.fsf@hornfels.zedat.fu-berlin.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Original-Sender: loris.bennett@fu-berlin.de X-Originating-IP: 130.133.144.203 Received-SPF: pass client-ip=130.133.4.66; envelope-from=loris@zedat.fu-berlin.de; helo=outpost1.zedat.fu-berlin.de X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=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.23 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" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1615820477; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=wQUSNO6/EHxNhWK9dRzQ49bXROdDQRoZExxwYkCW7mo=; b=U1O4Rpar2j/ySDFr2e8ucGp0NhOC91IIfYk5LpcezIyo8MFhmortt5X9xvC59iZAt9pUEp F0pRA+SaNX7ZmcNjOiQkVQY+g06foJlgNBFoH4sJRlHbaibAGQeXRadduGYdXJbZit5h8d fMWCWcbE+I6G5DBlCtURKyrp/nE3aw/1wb6lAAozLToPAVQKt9eXw9jNqQYGYirn2MPZrF GOHygxiUK02E+lhP72WB7beq1xz3dZRGjWaMGMRytNNl+D1n5pzz2M89l4xe86ho9FhDgu aqm+0SF9cj0scAp6MDKWFxBJre8HTKF0sUdcSQlse6vJTWbVt3bx8supxLsRDA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1615820477; a=rsa-sha256; cv=none; b=lqsXvZszApsFAKznqRL7xaCEiwxWYGfggVt23KjWb+iCH3VMZLDvTc7SW8HQ6IGrZN4h/k AFmPK83o0iBG4W7i5lUQHavd8dsVxnTqKNF4KRp8vC31pfGbycSlU5uJIH7eLzx1VRIXGP E18Y3jja50+EgJb99MUO/onDjqq6XDcGubHL//6QqUCW6cGTtx5IDLUZcEFTk6T2bCRhrj Zovj+7zmNmOQ7yIt+SmYeur9jWQLVz6g1Gh0eB2BB8Cs+J0CyNFKLQhfJPxbUfFvDxpBXp H3DEFgdrtHRnuiqMTb3mB9gDbx7IoCT5Sx3qe0T3B4L+t1bFRq9v7u62JJdExg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: 0.10 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 73D42267C2 X-Spam-Score: 0.10 X-Migadu-Scanner: scn0.migadu.com X-TUID: /ZrcDDvCt9gF Hi, I have multiple versions of each of various languages such as Python or R. On the command line I can select a version using the 'module'[1] mechanism provided by Lmod[2]: module load Python/2.7.18-GCCcore-9.3.0 or module load Python/3.8.6-GCCcore-10.2.0 This 'module' mechanism basically just provides a sane way to tweak and untweak environment variables. My question is: How do I change the environment, ideally call 'module load ...' but potentially just set environment variables, before calling a source block? Cheers, Loris Footnotes: [1] Nothing to do with Python modules [2] https://lmod.readthedocs.io/en/latest/index.html -- This signature is currently under construction.