title: calling conda source activate from bash script
body: <p>I'm trying to activate my conda env via a bash script. Even though the script runs fine and my PATH appears to be changed within the script, it's getting reset somehow after the script terminates. I can call <code>source activate test</code> from the cmd line and it works fine. An example along with output below.</p>
  
  <p><strong>script:</strong></p>
  
  <pre><code>PycharmProjects/test » cat ./example.sh
  echo "before calling source: $PATH"
  source activate test
  echo "after calling source: $PATH"
  </code></pre>
  
  <p><strong>output:</strong></p>
  
  <pre><code>./example.sh
  before calling source: /Use rs/me/miniconda3/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin
  
  discarding /Users/me/miniconda3/bin from PATH
  prepending /Users/me/miniconda3/envs/test/bin to PATH
  
  after calling source: /Users/me/miniconda3/envs/test/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin`
  </code></pre>
  
  <p>but if I <code>echo $PATH</code> after the script finishes, you can see that the <code>$PATH</code> has not changed (i.e. no <code>/Users/me/miniconda3/envs/test/bin</code>):</p>
  
  <p><code>PycharmProjects/test » echo $PATH /Users/me/miniconda3/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin</code></p>