Installing Python
Last Revision: July, 2010
( McCann )

The intended audience for this document is the Fall 2010 ISTA 130 class at the University of Arizona. If other people also find it helpful, great!


Outline

  1. Do I Really Need to Install Python?
  2. Which Version of Python Should I Install?
    1. Python 2.*
    2. Python 3.*
  3. How Do I Install Python for My Operating System?
    1. MS Windows
    2. Mac OS
    3. Linux
  4. Do I Need The Textbook's Graphics Library, Too?
  5. Is There Anything Else that I Need to Install?

  1. Do I Really Need to Install Python?

    The answer to this question depends on where you plan to work on your programming assignments. If you plan to do them in one of the Computer Science department's labs (GS 228 and/or 930), then no, you don't need to install Python; we've done it for you.

    But, if you plan to do the assignments elsewhere, we recommend installing Python yourself on your desktop computer, laptop, or both. The installation process is straight-forward.

  2. Which Version of Python Should I Install?

    The short answer is: Python 3. If that's all you wanted to know, great; skip ahead to Section 3. If you're curious to learn why the question even needs to be asked, read on.

    The question needs to be asked because there are two current versions of Python: Python 2 and Python 3. Python 2 has been around since the year 2000, while Python 3 was introduced in 2008. Python 3 is sufficiently different from Python 2 that 3 did not replace 2 immediately; in fact, the change-over is still occurring.

    Creating a new, incompatible version of a popular language isn't done lightly. So, why did the Python language maintainers do it? In short, Python 3 eliminates a variety of inconsistencies that existed in Python 2, inconsistencies that made Python harder to learn than it needed to be. So, be happy! Python was already a fairly easy programming language to learn; now it's even easier!

    1. Python 2.*

      The last planned version of Python 2, 2.7, was released in early July of 2010. Many programmers still maintain code that was written in Python 2, including many libraries that have yet to be converted to Python 3. For that reason, it is expected that Python 2 will be in active use for several more years.

      If you are interested in playing around with Python 2, or if you find interesting Python 2 programs and want to run them, you can install Python 2. Please note that while having both versions of Python installed on the same computer is entirely possible, it can be a little confusing. If you don't have a good reason to install Python 2, it's probably a good idea to just install Python 3.

    2. Python 3.*

      Programmers writing new code are encouraged to use Python 3, which is why we are using Python 3 in ISTA 130. Happily, if you should happen upon some Python 2 code, you'll find that nearly all of the statements are the same in Python 2 as they are in Python 3.

  3. How Do I Install Python for My Operating System?

    1. MS Windows

      If you are running a version of Windows, visit the Python 3.1.2 page (the current version of Python 3 at this time) and scroll down to the Download section. There are two Windows installers available. If you are using a 64-bit version of Windows, download the Windows X86-64 MSI Installer. Otherwise, download the Windows x86 MSI Installer. Run the installer, and follow the directions. Easy!

    2. Mac OS

      If you are running Mac OS, visit the Python 3.1.2 page (the current version of Python 3 at this time), and scroll down to the Download section. Click the link for the Mac Installer disk image. Run the installer, and follow the directions. Easy!

    3. Linux

      If you run Linux on your personal computer, then you already know that various software installation options exist. Hopefully, you have a version of Linux that supports one of the application installation systems. If so, you probably already know about it, and how to use it. If not, visit your Linux distribution's web page and read up on it. Then, be sure that you install both the Python 3 and the IDLE IDE packages.

      Another option is to install the Python language source code and compile it yourself. To get the "tar ball," visit the Python 3.1.2 page (the current version of Python 3 at this time), and scroll down to the Download section. Click the link for the source tar ball that's packaged the way you want it (gzip or bzip). From there, you're on your own.

  4. Do I Need The Textbook's Graphics Library, Too?

    Very likely. We haven't decided for sure that we will use it, but we probably will.

    Our textbook is the second edition of John Zelle's "Python Programming: An Introduction to Computer Science." The text has a companion web site: http://mcsp.wartburg.edu/zelle/python/. Go to that site, then click on "Python 3.x Resources" in the left column. From that page, you can get the graphics.py file. Put it in the directory in which you will store your Python programs. If you're feeling more ambitious, you can place that file in the same directory as all of the standard Python libraries, but that's both not necessary and more detail than we want to include here.

  5. Is There Anything Else that I Need to Install?

    Not right away. We may use one or more additional libraries. If we do, we'll let you know where to get them. For now, if you've installed Python 3, IDLE, and the textbook's graphics library, you're ready to go.


Do you have a comment on this page? I'd like to hear it; you can email me at mccannl@acm.org.