From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 8GNLASXiu1++TgAA0tVLHw (envelope-from ) for ; Mon, 23 Nov 2020 16:24:05 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id sAvAOCTiu1/iCQAAbx9fmQ (envelope-from ) for ; Mon, 23 Nov 2020 16:24:04 +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 68D97940222 for ; Mon, 23 Nov 2020 16:24:04 +0000 (UTC) Received: from localhost ([::1]:43972 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1khEdH-0001Xq-DX for larch@yhetil.org; Mon, 23 Nov 2020 11:24:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45356) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1khEbN-0000Sr-PR for emacs-orgmode@gnu.org; Mon, 23 Nov 2020 11:22:05 -0500 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]:33720) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1khEbG-000430-A9 for emacs-orgmode@gnu.org; Mon, 23 Nov 2020 11:22:05 -0500 Received: by mail-pf1-x431.google.com with SMTP id q10so15370713pfn.0 for ; Mon, 23 Nov 2020 08:21:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:in-reply-to:references:date:message-id:mime-version; bh=EQUYA4L6+cqW7f10muD/DwlR8OFmP0ZXlq9sqztrPLQ=; b=g7aVcTYmI2rVQhdZpyXdYlME2twtXdv9Jho4/JSPNEbCtXLoXltQc0dZFgmlAmbuWn 3Dnn4UJHdrYOd7R/oEsBC9RYms6h7a7Q+KUA7fQMlhsb145s7/edc3atPHW4BmhUVtSI T5YBM0qOm/hZnhGOpZGhewRrj+K1ndrvNLcgx9f0jVqoGsGpMefNLdZodi53ImmCn6+H EV7IF+rafNYoSawRwpWbgeq+oXtoto76b7hRaDU9gwSpX1GKSHqZGBHmjqmV2s96LVZy ux7rOOilBOaScuNXuPovyR+FH8oUPnnzKgBt7IQqsBFJkIl+W9qPC4LqY1GIgq0FAipQ 3XwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version; bh=EQUYA4L6+cqW7f10muD/DwlR8OFmP0ZXlq9sqztrPLQ=; b=FNF3yEXI2PAMsbb6KTUT+iL+6J29xsZzOdwb3VTl57wSuryviDIR9umI/1Fsah8gM8 B9k/g/3gyuaVl3q2+bcUmAgqshCF7mCpOTErC78dr1MLBNUqJdFExIJOEXLdN7za+QOs Y9DAeIgbdhXKE0MHmqonlGWzF5HvuT71VfLFa9a70M1kYDqg60rp+7yIAyaq/Ipy9ua7 PfRvhhC8arT528A/OxbKrJS+KarRNKncxr9zzuwtdgEHady7hSXeupakfenNGMA9t65r xNGrB1n5Vf6l3qbOUlgXi+xyUE9pP1qA0whVcXVdjD6aVwYHUkroIKWbGFW6FoYfNfki UX8g== X-Gm-Message-State: AOAM531mXTCp7iJG2hMarVgBooNXgPpfk3dSl+dJ11FjKXSkzHd3WBO8 L8kY/FXOzl13Lmc8XZFTh/Y= X-Google-Smtp-Source: ABdhPJw7XEfhGp1B4D6RXDfdCoDfQ8tulQ90BwY3DY6XdVtDw6eL7Li9oo/+jjoMCy5Xz5NFo2OYXQ== X-Received: by 2002:a17:90a:fd18:: with SMTP id cv24mr518531pjb.105.1606148515683; Mon, 23 Nov 2020 08:21:55 -0800 (PST) Received: from localhost (199-83-220-90.PUBLIC.monkeybrains.net. [199.83.220.90]) by smtp.gmail.com with ESMTPSA id ga16sm14023153pjb.43.2020.11.23.08.21.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Nov 2020 08:21:55 -0800 (PST) From: Jack Kamm To: Joost Kremers , emacs-orgmode@gnu.org Subject: Re: ob-python: import local package into a session In-Reply-To: <871rgkniyz.fsf@gmail.com> References: <87eekkt6s9.fsf@fastmail.fm> <871rgkniyz.fsf@gmail.com> Date: Mon, 23 Nov 2020 08:21:54 -0800 Message-ID: <87y2ism4bh.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::431; envelope-from=jackkamm@gmail.com; helo=mail-pf1-x431.google.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=g7aVcTYm; dmarc=pass (policy=none) header.from=gmail.com; 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-Spam-Score: -1.71 X-TUID: 5htALPqdw6YI Jack Kamm writes: > You need to make sure your module is either in the working directory you > started the Python session in, or in your PYTHONPATH, for example by > adjusting os.env["PYTHONPATH"] before attempting to import the module. Sorry, this was incorrect, you need to set PYTHONPATH before starting Python. The correct way to do it from within Python is to use sys.path, as John points out.