emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: William Henney <whenney@gmail.com>
To: Ken Mankoff <mankoff@gmail.com>
Cc: emacs-org <emacs-orgmode@gnu.org>
Subject: Re: Mixing Python2 and Python3 blocks in one file
Date: Thu, 19 May 2016 15:01:31 -0500	[thread overview]
Message-ID: <CAKchnZN8+6Q9XoaLfpbQjhmwjYYZkUfq0z-d9FDM-BBBO4q+-A@mail.gmail.com> (raw)
In-Reply-To: <m21t4xrgi3.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1834 bytes --]

On Thu, May 19, 2016 at 2:32 PM, Ken Mankoff <mankoff@gmail.com> wrote:

>
> On 2016-05-19 at 15:21, William Henney <whenney@gmail.com> wrote:
> > I think Elpy works fine with conda environments - you just have to
> > call pyvenv-activate with the desired path.
>
> Yes, I have discovered that since I sent my email.
>
> > You have inspired me to try and automate this for org source blocks
> > (see org snippets below). It is a bit clunky, but I got it to work.
> > Let me know what you think, and any stylistic corrections are welcome
> > (my lisp skills are sadly lacking).
>
> Better than my lisp. It looks good, but I like to keep my virtual envs in
> the folder where the work happens. That is, I create them with =conda env
> create -y -p ./pyenv=. I think this means your code below will fail because
> it is looking for an =/envs/= folder. However, my method allows all virtual
> environments to always have the same name, which could make the code (and
> testing for the existence of that folder) easier.
>
>
Yes, that’s right.  You can just edit the part that says (string-match
"/envs/" venv) and change "/envs/" to a regex that matches the way you name
your environments.  For instance, just the literal string "pyenv" should
work.  Or, even better, "env" would match both your convention and the
standard location.



> > + One thing we have to remember is to install the elpy python package
> > and dependencies in each virtual environment. For instance:
>
> This can also be handled by =~./condarc= and the default packages
> installed whenever a virtual environment is created.
>
>
That's good to know - thanks

Will


>   -k.
>



-- 

  Dr William Henney, Instituto de Radioastronomía y Astrofísica,
  Universidad Nacional Autónoma de México, Campus Morelia

[-- Attachment #2: Type: text/html, Size: 3059 bytes --]

      reply	other threads:[~2016-05-19 20:01 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-08  8:31 Mixing Python2 and Python3 blocks in one file Karl Voit
2016-05-08 15:13 ` Karl Voit
2016-05-17 14:24 ` William Henney
2016-05-17 14:54   ` Karl Voit
2016-05-17 15:37     ` John Kitchin
2016-05-18  1:19     ` William Henney
2016-05-18  3:42       ` Thomas S. Dye
2016-05-18  7:11         ` Karl Voit
2016-05-18  7:10       ` Division of Org documentation: Org manual and Worg (was: Mixing Python2 and Python3 blocks in one file) Karl Voit
2016-05-18  8:10         ` Division of Org documentation: Org manual and Worg Daniele Pizzolli
2016-05-18  9:03           ` Rasmus
2016-05-18 10:08             ` Daniele Pizzolli
2016-05-18 10:18               ` Rasmus
2016-05-20 17:15                 ` Daniele Pizzolli
2016-05-20 18:46                   ` Rasmus
2016-05-18 10:18               ` Daniele Pizzolli
2016-05-18 13:45       ` Mixing Python2 and Python3 blocks in one file Ken Mankoff
2016-05-19  3:37         ` William Henney
2016-05-19 13:18           ` Ken Mankoff
2016-05-19 19:21             ` William Henney
2016-05-19 19:32               ` Ken Mankoff
2016-05-19 20:01                 ` William Henney [this message]

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=CAKchnZN8+6Q9XoaLfpbQjhmwjYYZkUfq0z-d9FDM-BBBO4q+-A@mail.gmail.com \
    --to=whenney@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mankoff@gmail.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public 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).