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

no edit summary
imported>Jesstess
(Created page with "Linux ships with Python installed, so the goal of this page is to make sure you can start a terminal and run Python from the command line. <ol> <li>Start up a Terminal. You ...")
 
imported>Jesstess
No edit summary
Line 1:
Lucky for us, Linux shipscomes with Python installed,! soAll thewe goalneed of thisto pagedo is tomake sure we have an appropriate version of Python installed and make sure youwe can start a terminalTerminal and run Python from the command line.
 
If you need help or have questions during this step, [[Skillshare intro to Python/Asking questions| don't hesitate to ask]]!
 
<ol>
Line 5 ⟶ 7:
 
<br />
This Terminal containsgives you something called a commandterminal prompt. This commandterminal 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 commandterminal prompt.
</li>
<li>Test your Python install at the command prompt. Type
Line 13 ⟶ 15:
</pre>
 
and hitpress enterEnter. You should see something like
<pre>
Python 2.7.15 (r252:60911, Jan 24 2011, 17:44:40)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Line 22 ⟶ 24:
</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 />
 
* IfCheck the Python version numberin your Terminal output (2.7.1the version in the example above) is not2.7.5). It needs to be a numberversion between Python 2.45 and Python 2.7 (ignoringfor thethis numberclass. afterIf theyou secondhave dot),too tellold or too new a staffversion, memberplease visit http://python.org/ftp/python/2.7.5/python-2.7.5-macosx10.6.dmg to download and install Python version 2.7.5.
</li>
<li>To exit the Python prompt, type
Line 35 ⟶ 37:
</ol>
 
'''== Success!''' ==
You might need to install a package called python-tk.
 
'''Success!'''
 
You have tested your Python installation.
 
[[File:Champagne.png|100px]][[File:Party.png|125px]]
 
[[Skillshare intro to Python/Unit 1|&laquo; Back to the Unit 1 main page]]
Anonymous user