Skillshare intro to Python/Unit 1/Linux set up Python: Difference between revisions

no edit summary
imported>Jesstess
No edit summary
imported>Jesstess
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1:
[[File:Python-logo.png|300px]]
 
Lucky for us, Linux comes with Python installed! All we need to do is make sure we have an appropriate version of Python installed and make sure we can start a Terminal and run Python from the command line.
 
Line 7 ⟶ 9:
 
<br />
This Terminal gives youcontains something called a terminalcommand prompt. This terminalcommand 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 terminalcommand prompt.
</li>
<li>Test your Python install at the command prompt. Type
Line 15 ⟶ 17:
</pre>
 
and presshit Enterenter. You should see something like
<pre>
Python 2.7.5 (r252:60911, Jan 24 2011, 17:44:40)
Line 24 ⟶ 26:
</li>
 
* 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.<br />
 
Check* If the Python version in your Terminal outputnumber (the version2.7.5 in the example above) is 2.7.5). It needs to benot a versionnumber between Python 2.54 and Python 2.7 for(ignoring thisthe class.number Ifafter youthe havesecond toodot), old or too newtell a version,staff please visit http://python.org/ftp/python/2.7.5/python-2.7.5-macosx10.6.dmg to download and install Python version 2.7.5member.
</li>
<li>To exit the Python prompt, type
Line 36 ⟶ 38:
and press Enter. This will take you back to the Linux command prompt.</li>
</ol>
 
 
== Success! ==
Anonymous user