Python on Windows: Difference between revisions

From OpenHatch wiki
imported>Jesstess
No edit summary
imported>Jesstess
No edit summary
Line 2: Line 2:
 
<li>Go to http://python.org/download/ and download the latest version of Python 2.7 (2.7.1 at the time of writing). Unless you know otherwise, get the "Windows Installer" version, and not the "Windows X86-64 Installer" version.</li>
 
<li>Go to http://python.org/download/ and download the latest version of Python 2.7 (2.7.1 at the time of writing). Unless you know otherwise, get the "Windows Installer" version, and not the "Windows X86-64 Installer" version.</li>
 
<li>Start up a command prompt by clicking on the Start menu, clicking the "Run..." option, typing "cmd", and hitting enter.</li>
 
<li>Start up a command prompt by clicking on the Start menu, clicking the "Run..." option, typing "cmd", and hitting enter.</li>
<li>Test your Python install at the command prompt using the "-V" version flag:
+
<li>Test your Python install by typing
   
  +
<pre>
\Python27\python.exe -V
+
\Python27\python.exe
  +
</pre>
   
You should see something like
+
and hitting enter. You should see something like
 
<pre>
 
<pre>
 
Python 2.7.1 (r271:86832, ...) on win32
 
Python 2.7.1 (r271:86832, ...) on win32

Revision as of 16:32, 4 March 2011

  1. Go to http://python.org/download/ and download the latest version of Python 2.7 (2.7.1 at the time of writing). Unless you know otherwise, get the "Windows Installer" version, and not the "Windows X86-64 Installer" version.
  2. Start up a command prompt by clicking on the Start menu, clicking the "Run..." option, typing "cmd", and hitting enter.
  3. Test your Python install by typing
    \Python27\python.exe
    

    and hitting enter. You should see something like

    Python 2.7.1 (r271:86832, ...) on win32
    Type "help", "copyright", "credits" or "license" for more information.
    >>>
    
  4. To exit the Python prompt, type exit() and press Enter. This will take you back to the Windows command prompt.