title: conda and python shell scripts
body: <p>Suppose I have a python shell script of the usual shebang kind (let's suppose it's in a file called <code>foo.py</code>:</p>
  
  <pre><code>#!/usr/bin/env python
  print("Hello World")
  </code></pre>
  
  <p>with the twist that I need to run it in a given python environment Now, of course, I can write a script of the following kind:</p>
  
  <pre><code>#!/bin/sh
  conda activate myenv
  exec foo.py
  </code></pre>
  
  <p>But this is mildly unsatisfying aesthetically. Is there a way to package the environment into the script to avoid the extra level of scripting?</p>