Boston Python Workshop 8/Friday/Windows set up Python: Difference between revisions

Content added Content deleted
imported>Jesstess
(Created page with "== Download and install Python == If you believe you already have Python installed, please let a staff member know before completing these steps. <ol> <li>Click http://pytho...")
 
imported>Jesstess
No edit summary
Line 1: Line 1:
[[File:Python-logo.png|300px]]
== Download and install Python ==


We are going to install Python version 2.7.5.
If you believe you already have Python installed, please let a staff member know before completing these steps.

If you already have Python installed, check the Python version: if the version is between Python 2.5 and Python 2.7, you can use it for this class and can skip to [[Windows_set_up_Python#Put_Python_on_the_PATH|setting your Path]].

If you need help or have questions during installation, [[Skillshare intro to Python/Asking questions| don't hesitate to ask]]!

== Download and install Python ==


<ol>
<ol>
<li>Click http://python.org/ftp/python/2.7.1/python-2.7.1.msi and choose "run" if you have the option to. Otherwise, save it to your Desktop, then minimize windows to see your desktop, and double click on it to start the installer. Follow the installer instructions to completion.</li>
<li>Click http://python.org/ftp/python/2.7.5/python-2.7.5.msi and choose "run" if you have the option to. Otherwise, save it to your Desktop, then minimize windows to see your desktop, and double click on it to start the installer. Follow the installer instructions to completion.</li>
<li><b>Open a command prompt (we will be doing this multiple times, so make a note of how to do this!)</b>:
<li><b>Open a terminal (we will be doing this multiple times, so make a note of how to do this!)</b>:
* On Windows Vista or Windows 7: click on the Start menu (the Windows logo in the lower left of the screen), type <code>cmd</code> into the Search field directly above the Start menu button, and click on "cmd" in the search results above the Search field.
* On Windows Vista or Windows 7: click on the Start menu (the Windows logo in the lower left of the screen), type <code>cmd</code> into the Search field directly above the Start menu button, and click on "cmd" in the search results above the Search field.
* On Windows XP: click on the Start menu (the Windows logo in the lower left of the screen), click on "Run...", type <code>cmd</code> into the text box, and hit enter.
* On Windows XP: click on the Start menu (the Windows logo in the lower left of the screen), click on "Run...", type <code>cmd</code> into the text box, and hit enter.
<br />
<br />
You now have what's called a command prompt. This command prompt is another way of navigating your computer and running programs -- just textually instead of graphically. We are going to be running Python and Python scripts from this command prompt.
You have started a <b>terminal prompt</b>. This terminal prompt is another way of navigating your computer and running programs -- just textually instead of graphically. We are going to be running Python and Python scripts from this terminal prompt.
</li>
</li>
<li>At this <code>C:\</code> prompt that appears, test your Python install by typing
<li>At this <code>C:\</code> prompt that appears, test your Python installation by typing:


<pre>
<pre>
Line 17: Line 23:
</pre>
</pre>


and hitting enter. You should see something like
and pressing Enter. You should see something like
<pre>
<pre>
Python 2.7.1 (r271:86832, ...) on win32
Python 2.7.5 (r271:86832, ...) on win32
Type "help", "copyright", "credits" or "license" for more information.
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>>
</pre>
</pre>


You just started Python! The <code>>>></code> indicates that you are at a new type of prompt -- a Python prompt. The command prompt lets you navigate your computer and run programs, and the Python prompt lets you write and run Python code interactively.
You just started Python! The <code>>>></code> indicates that you are at a new type of prompt -- a Python prompt. The terminal prompt lets you navigate your computer and run programs, and the Python prompt lets you write and run Python code interactively.


</li>
</li>
Line 66: Line 72:
#* A window with the "Variable name" and the "Variable value" should appear. The "Variable value" will already have some text in it; click in the box to unhighlight it (we don't want to accidentally delete that text).
#* A window with the "Variable name" and the "Variable value" should appear. The "Variable value" will already have some text in it; click in the box to unhighlight it (we don't want to accidentally delete that text).
# In the "Variable value" box, scroll to the end. Add the following text, and hit OK. Make sure to include the semicolon at the start! <pre>;c:\python27\;c:\python27\scripts</pre>
# In the "Variable value" box, scroll to the end. Add the following text, and hit OK. Make sure to include the semicolon at the start! <pre>;c:\python27\;c:\python27\scripts</pre>
# Hit "OK" to close out the system properties window.
# Press "OK" to close out the system properties window.
# Test your change:
# Test your change:
## Open up a <b>new</b> command prompt: you do this the same way you did above when installing python. This needs to be a new command prompt because the changes you just made didn't take affect in prompts that were already open.
## Open up a <b>new</b> command prompt: you do this the same way you did above when installing python. This needs to be a new command prompt because the changes you just made didn't take affect in prompts that were already open.
Line 76: Line 82:


You have Python installed and configured.
You have Python installed and configured.

[[File:Champagne.png|100px]][[File:Party.png|125px]]


[[Boston Python Workshop 8/Friday|&laquo; Back to the Friday setup page]]
[[Boston Python Workshop 8/Friday|&laquo; Back to the Friday setup page]]