Before we can begin programming you'll need to install software called the Python interpreter on your computer. (You may need to ask an adult for help here.) The interpreter is a program that understands the instructions that you’ll write (or rather, type out) in the Python language. Without the interpreter, your computer won't be able to run your Python programs. We'll just refer to ―the Python interpreter‖ as ―Python‖ from now on.
The Python interpreter software can be downloaded from the official website of the Python
programming language, http://www.python.org. You might want the help of someone else to download and install the Python software. The installation is a little different depending on if your computer’s operating system is Windows, Mac OS X, or a Linux OS such as Ubuntu. You can also find videos online of people installing the Python software on their computers at http://invpy.com/installing.
Windows Instructions:
When you get to http://python.org, you should see a list of links on the left . Click on the Download link to go to the download page, then look for the file called ―Python 3.2 Windows Installer (Windows binary --does not include source)‖ and click on its link to download Python for Windows.
Double-click on the python-3.2.msi file that you've just downloaded to start the Python installer.
(If it doesn’t start, try right-clicking the file and choosing Install.) Once the installer starts up,
just keep clicking the Next button and just accept the choices in the installer as you go (no need to make any changes). When the install is finished, click Finish.
Mac OS X Instructions
Mac OS X 10.5 comes with Python 2.5.1 pre-installed by Apple. Currently, Pygame only
supports Python 2 and not Python 3. However, the programs in this book work with both Python 2 and 3.
The Python website also has some additional information about using Python on a Mac at
http://docs.python.org/dev/using/mac.html.
Ubuntu and Linux Instructions
Pygame for Linux also only supports Python 2, not Python 3. If your operating system is Ubuntu, you can install Python by opening a terminal window (from the desktop click on Applications > Accessories > Terminal) and entering ―sudo apt-get install python2.7
then pressing Enter. You will need to enter the root password to install Python, so ask the person who owns the computer to type in this password if you do not know it.
You also need to install the IDLE software. From the terminal, type in ―sudo apt-get
install idle‖. The root password is also needed to install IDLE (ask the owner of your
computer to type in this password for you)
The Python interpreter software can be downloaded from the official website of the Python
programming language, http://www.python.org. You might want the help of someone else to download and install the Python software. The installation is a little different depending on if your computer’s operating system is Windows, Mac OS X, or a Linux OS such as Ubuntu. You can also find videos online of people installing the Python software on their computers at http://invpy.com/installing.
Windows Instructions:
When you get to http://python.org, you should see a list of links on the left . Click on the Download link to go to the download page, then look for the file called ―Python 3.2 Windows Installer (Windows binary --does not include source)‖ and click on its link to download Python for Windows.
Double-click on the python-3.2.msi file that you've just downloaded to start the Python installer.
(If it doesn’t start, try right-clicking the file and choosing Install.) Once the installer starts up,
just keep clicking the Next button and just accept the choices in the installer as you go (no need to make any changes). When the install is finished, click Finish.
Mac OS X Instructions
Mac OS X 10.5 comes with Python 2.5.1 pre-installed by Apple. Currently, Pygame only
supports Python 2 and not Python 3. However, the programs in this book work with both Python 2 and 3.
The Python website also has some additional information about using Python on a Mac at
http://docs.python.org/dev/using/mac.html.
Ubuntu and Linux Instructions
Pygame for Linux also only supports Python 2, not Python 3. If your operating system is Ubuntu, you can install Python by opening a terminal window (from the desktop click on Applications > Accessories > Terminal) and entering ―sudo apt-get install python2.7
then pressing Enter. You will need to enter the root password to install Python, so ask the person who owns the computer to type in this password if you do not know it.
You also need to install the IDLE software. From the terminal, type in ―sudo apt-get
install idle‖. The root password is also needed to install IDLE (ask the owner of your
computer to type in this password for you)
Aucun commentaire:
Enregistrer un commentaire