title: Problem setting python environment from a script
body: <p>I'm using the Ubuntu app in windows 10 and I'm running into a problem when trying to start the Python environment from a script.</p>
  
  <p>I've installed python and i can run python scripts when i set my environment from the command line but when I try and set it using a script nothing changes.</p>
  
  <p>I can run this from my command line fine:</p>
  
  <pre><code>source /home/bootys/environments/my_env/bin/activate
  </code></pre>
  
  <p>But when I run the same thing in a script nothing changes:</p>
  
  <pre><code>#!/bin/bash
  echo "Setting to Python Environment"
  source /home/bootys/environments/my_env/bin/activate
  if [ $? -eq 0 ]
  then
  echo "Environment has been set to Python"
  else
  echo "Failed to set environment"
  fi
  </code></pre>
  
  <p>I'm expecting to see my environment being set to this, which is what happens when it is run from the command line:</p>
  
  <pre><code>(my_env) bootys@ThisPC:~/MyScripts$
  </code></pre>
  
  <p>But nothing changes even though the exit status check returns successful.</p>
  
  <p>Is the script run in a sub shell? If so whats the practice to source my environment from a script?</p>