title: Setting python version from command line
body: <p>I am trying to run an R script from the command line using <code>Rscript</code>. The R script calls some python code and works fine when run interactively. However, when I call it from <code>Rscript</code> I get some errors with <code>gdal</code>. I believe the errors are related to python 3 vs 2. For example, running the following command in an interactive R session:</p>
  
  <p><code>system("python --version)</code>  </p>
  
  <p>yields</p>
  
  <blockquote>
    <p>Python 2.7.9</p>
  </blockquote>
  
  <p>while running the "same" command from the shell:  </p>
  
  <p><code>$ python --version</code>  </p>
  
  <p>yields</p>
  
  <blockquote>
    <p>Python 3.5.1 :: Continuum Analytics, Inc.</p>
  </blockquote>
  
  <p>How can I point my <code>$ Rscript "foo.R"</code> calls to python 2.7.9?</p>