emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Maxim Nikulin <manikulin@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: ob-python: import local package into a session
Date: Tue, 24 Nov 2020 19:23:34 +0700	[thread overview]
Message-ID: <rpiu06$kt1$1@ciao.gmane.io> (raw)
In-Reply-To: <87eekkt6s9.fsf@fastmail.fm>

2020-11-23 Joost Kremers wrote:
> 
> I can include packages installed in
> `site-packages` and have them available in all code blocks. But is there a way
> to import my own packages into a session? In particular, packages I haven't
> installed system-wide?

I do not have a recipe ready for using with org mode, and maybe you have 
already tried the following instruments:

1. Besides system-wide site-packages directory, there is similar ones 
for users, used by e.g. `pip install` (unless it is disabled accordingly 
to some recommendations).

2. It seems that *recommended* and more flexible way is per-project 
(per-version) virtual environments: venv in python3, similar thing were 
called virtualenv in python2: 
https://docs.python.org/3/tutorial/venv.html Maybe there is a convenient 
way to choose and switch venv's directly from emacs. In simple cases 
venv could be activated before starting emacs.

3. The Hitchhiker's Guide to Python have a couple of related sections. 
They might be a bit outdated but could be a source for convincing 
arguments to use venv's or for some usage patterns.
https://docs.python-guide.org/dev/virtualenvs/
https://docs.python-guide.org/dev/pip-virtualenv/



  parent reply	other threads:[~2020-11-24 12:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-23 15:46 Joost Kremers
2020-11-23 16:03 ` John Kitchin
2020-11-23 16:20 ` Jack Kamm
2020-11-23 16:21   ` Jack Kamm
2020-11-23 22:47   ` Joost Kremers
2020-11-24 12:23 ` Maxim Nikulin [this message]
2020-11-24 13:35   ` Joost Kremers
2020-11-24 14:24     ` Jack Kamm
2020-11-24 18:40       ` Tom Gillespie
2020-11-25 12:58       ` Joost Kremers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='rpiu06$kt1$1@ciao.gmane.io' \
    --to=manikulin@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --subject='Re: ob-python: import local package into a session' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).