title: Best way to execute a python script in a given conda environment
body: <p>I want to execute a python script <code>executed.py</code> from another python script <code>trigger.py</code> using the subprocess package. The <code>executed.py</code> must be ran in a different conda environment than <code>trigger.py</code> (let say <strong><code>executed_env</code></strong> and <strong><code>trigger_env</code></strong>). What is the best way to do that ? My current code of <code>trigger.py</code> is:</p>
  
  <pre><code>command = "python executed.py --option1 -dir /path/to/dir"
  args = shlex.split(command)
  my_subprocess = subprocess.Popen(args)
  </code></pre>
  
  <p>It returns an error since <code>executed.py</code> is ran in the <strong><code>trigger_env</code></strong> environment.</p>