This appendix will walk you through each step of installing Python on Windows, Mac, or Linux. Depending on your operating system version, what you see here might be slightly different from what’s on your screen, but these steps should get you up and running.
If you’re installing Python on a computer at school or work, you may need help or permission from the IT department to perform the installation. If you run into issues installing Python at school, ask for IT help and let them know you’re studying programming.
For Windows, we’ll use Python version 3.2.5 so that our Pygame installation (in Appendix B) for the programs in to will be easier.
IDLE
).print("Hello, Python!")
and press ENTER. The Python shell should respond with Hello, Python!
, as shown in . Try an addition statement, like 2 + 3
. Press ENTER, and Python will respond with the answer!Now you’re ready to tackle through . To use the programs from through , go to Appendix B and follow the steps to install Pygame. Happy coding!
Most Apple computers come with an earlier version of Python already installed, but we want to install version 3.4.2 to use the new features of Python 3 to run the sample code from the book.
print("Hello, Python!")
and press RETURN; the Python shell should respond with Hello, Python!
, as shown in . Try an addition statement, like 2 + 3
. Press RETURN, and Python will respond with the answer.Most Linux distributions, including Ubuntu and even the Linux OS that comes installed on the Raspberry Pi, come with an earlier version of Python already installed. However, most of the apps in this book require Python 3. To install Python 3 on Linux, follow these steps:
2 + 3
and pressing ENTER. Type print("Hello, world.")
and press ENTER. IDLE should respond as shown in .