title: How to execute script in Anaconda with different installed Python versions?
body: <p>I want to run a script in Anaconda using Python 2.7.
  I am using Windows 8 with Anaconda 3 and Python 3.6.5.
  I created another environment with python 2.7.15 and activated it in Anaconda Prompt like advised here: <a href="https://conda.io/docs/user-guide/tasks/manage-python.html" rel="nofollow noreferrer">https://conda.io/docs/user-guide/tasks/manage-python.html</a></p>
  
  <p>How can I run this:
  <code>print "HellWorld!"</code></p>
  
  <p>I remember there was a way to run the script from the spyder console just adding the version to the command line but I cannot remember the syntax.</p>
  
  <p>What I did so far:</p>
  
  <p>I activated py27 by typing into Anaconda Prompt:</p>
  
  <pre><code>conda activate py27
  </code></pre>
  
  <p>I checked if it was correctly activated (yes, it was) by:</p>
  
  <pre><code>python --version
  </code></pre>