Mercurial > pygame
annotate install.html @ 3194:9fcb7abf3185 default tip
Remove some gcc 4.7.2 compiler warnings
| author | Lenard Lindstrom <len-l@telus.net> |
|---|---|
| date | Tue, 23 Apr 2013 19:53:36 -0700 |
| parents | 59e3f3edea7b |
| children |
| rev | line source |
|---|---|
| 327 | 1 <html><head><!-- |
| 334 | 2 Install Information |
| 327 | 3 --><title>Pygame Installation</title></head><body> |
| 326 | 4 <h2 align=center>Pygame Installation</h2> |
| 5 | |
| 6 <p> | |
| 330 | 7 Python can be built from source, but the easiest way is to |
| 579 | 8 get a binary package for your type of system and version of Python. |
| 326 | 9 This document will give you information on either type of installation. |
| 10 </p> | |
| 11 | |
| 12 <big><b><u>Windows Binary Installer</u></b></big><blockquote><p> | |
| 13 This is probably the most popular method of installation. If you are | |
| 14 running on windows, it is highly recommended you use this form | |
| 15 of installing. The installers come with with nearly everything | |
|
3118
59e3f3edea7b
Fixed gramatical errors in documentation. Thanks to Szymon Wroblewski. Fixes #118.
Michael Rochseter <m.rochester93@googlemail.com>
parents:
1005
diff
changeset
|
16 you need and have an easy point and click installers. |
| 326 | 17 </p><p> |
| 18 The first thing you will need is an installation of Python. Python | |
| 19 binary installers make it easy to get this done. Pygame binaries | |
| 579 | 20 usually come for the latest 2 releases of Python, so you'll want to be fairly |
| 326 | 21 up to date. |
| 22 <p></p> | |
| 23 Once that is in place, you want to download the appropriate | |
| 24 windows binary. From the pygame downloads page you can find the .EXE | |
| 25 file you need. This will automatically install all of pygame and all the SDL | |
|
3118
59e3f3edea7b
Fixed gramatical errors in documentation. Thanks to Szymon Wroblewski. Fixes #118.
Michael Rochseter <m.rochester93@googlemail.com>
parents:
1005
diff
changeset
|
26 dependencies. The windows binaries have filenames like this: "pygame-1.8.0release.win32-py2.5.msi". |
|
978
9876164d679e
Updated links and text. Linked to wiki for compiling from source instructions.
Rene Dudfield <renesd@gmail.com>
parents:
812
diff
changeset
|
27 This would be the installer for pygame version 1.8.0, for Python version 2.5. You |
| 329 | 28 shouldn't have trouble finding the correct binary from the "Windows" section |
| 29 of the download page. | |
|
978
9876164d679e
Updated links and text. Linked to wiki for compiling from source instructions.
Rene Dudfield <renesd@gmail.com>
parents:
812
diff
changeset
|
30 <a href="http://www.pygame.org/download.shtml">http://www.pygame.org/download.shtml</a>. |
| 326 | 31 </p><p> |
| 32 You will also probably want to install the windows documentation and | |
| 33 installation package. This will add easy links to the different documentation | |
| 329 | 34 and games that come with pygame. The installer for this is found |
|
3118
59e3f3edea7b
Fixed gramatical errors in documentation. Thanks to Szymon Wroblewski. Fixes #118.
Michael Rochseter <m.rochester93@googlemail.com>
parents:
1005
diff
changeset
|
35 next to the other windows binary downloads. The filename looks like this: |
|
978
9876164d679e
Updated links and text. Linked to wiki for compiling from source instructions.
Rene Dudfield <renesd@gmail.com>
parents:
812
diff
changeset
|
36 "pygame-docs-1.8.0.exe". And this would install the documentation and |
|
9876164d679e
Updated links and text. Linked to wiki for compiling from source instructions.
Rene Dudfield <renesd@gmail.com>
parents:
812
diff
changeset
|
37 examples for pygame-1.8.0 |
| 326 | 38 </p><p> |
|
978
9876164d679e
Updated links and text. Linked to wiki for compiling from source instructions.
Rene Dudfield <renesd@gmail.com>
parents:
812
diff
changeset
|
39 One other thing the windows binaries are missing is the Numeric or numpy Python |
|
9876164d679e
Updated links and text. Linked to wiki for compiling from source instructions.
Rene Dudfield <renesd@gmail.com>
parents:
812
diff
changeset
|
40 packages. You can easily install this separately and it will allow you to use |
| 329 | 41 the pygame "surfarray" module. This module is optional, so there is no need |
|
1005
ea1264c694a8
install.txt was empty. install words made better.
Rene Dudfield <renesd@gmail.com>
parents:
978
diff
changeset
|
42 to do this. A Numeric for Windows python 2.5 can be found on the download page: <a href="http://www.pygame.org/download.shtml">http://www.pygame.org/download.shtml</a>. There are older binary installers from the Numeric download page. |
|
ea1264c694a8
install.txt was empty. install words made better.
Rene Dudfield <renesd@gmail.com>
parents:
978
diff
changeset
|
43 <a href="http://sourceforge.net/project/showfiles.php?group_id=1369">http://sourceforge.net/project/showfiles.php?group_id=1369</a>. |
|
ea1264c694a8
install.txt was empty. install words made better.
Rene Dudfield <renesd@gmail.com>
parents:
978
diff
changeset
|
44 </p> <p>PixelArray, which is built into pygame 1.8+, and is usually quite a lot faster is the recommended array implementation to use. Numpy is newer than Numeric, however both are not entirely compatible.</p></blockquote><br> |
| 326 | 45 |
| 46 <big><b><u>Unix Binary Packages</u></b></big><blockquote><p> | |
| 47 For many unix systems, the easiest way to install pygame is | |
| 48 from source. Still, there are binary packages available for | |
| 49 different distributions. | |
| 50 <p></p> | |
| 51 There are several binary RPM packages for linux machines. These are | |
| 401 | 52 actually a little bit of work to install, since you will also need several |
| 53 RPM packages for the dependencies. There is a good chance | |
| 326 | 54 your linux distribution came with the needed dependencies (like Python |
| 401 | 55 and SDL). There are binary RPMs available from the website for each dependency. |
| 326 | 56 </p><p> |
| 57 For debian systems, pygame is actively maintained in the debian | |
| 444 | 58 archives. Visit the debian pygame page for more information. |
|
978
9876164d679e
Updated links and text. Linked to wiki for compiling from source instructions.
Rene Dudfield <renesd@gmail.com>
parents:
812
diff
changeset
|
59 <a href="http://packages.qa.debian.org/p/pygame.html">http://packages.qa.debian.org/p/pygame.html</a> |
| 326 | 60 </p><p> |
| 61 FreeBSD also has an active pygame package. While techinicaly it | |
| 495 | 62 isn't binary, it is automatically built and installed by the |
| 326 | 63 ports manager. See the FreeBSD package page for more information. |
|
978
9876164d679e
Updated links and text. Linked to wiki for compiling from source instructions.
Rene Dudfield <renesd@gmail.com>
parents:
812
diff
changeset
|
64 <a href="http://www.freebsdports.info/ports/devel/py-game.html">http://www.freebsdports.info/ports/devel/py-game.html</a> |
| 444 | 65 </p><p> |
| 66 Gentoo has a builtin package for pygame. This is compiled for | |
| 67 your system as it installs, similar to BSD, | |
|
978
9876164d679e
Updated links and text. Linked to wiki for compiling from source instructions.
Rene Dudfield <renesd@gmail.com>
parents:
812
diff
changeset
|
68 <a href="http://packages.gentoo.org/package/dev-python/pygame">http://packages.gentoo.org/package/dev-python/pygame</a> |
| 326 | 69 </p></blockquote><br> |
| 70 | |
| 579 | 71 <big><b><u>Mac OS X Binaries</u></b></big><blockquote><p> |
| 72 For Mac OS X 10.3 and above, binary packages are available from | |
|
1005
ea1264c694a8
install.txt was empty. install words made better.
Rene Dudfield <renesd@gmail.com>
parents:
978
diff
changeset
|
73 <a href="http://www.pygame.org/download.shtml">http://www.pygame.org/download.shtml</a> |
| 495 | 74 </p><p> |
| 579 | 75 This package includes almost of the dependencies required for pygame |
| 76 (SDL, SDL_image, etc.), but you need PyObjC 1.2 or later, and may | |
|
1005
ea1264c694a8
install.txt was empty. install words made better.
Rene Dudfield <renesd@gmail.com>
parents:
978
diff
changeset
|
77 also want to get Numeric, numpy and PyOpenGL. A PyObjC 1.4 installer is also made available on the download page. |
|
ea1264c694a8
install.txt was empty. install words made better.
Rene Dudfield <renesd@gmail.com>
parents:
978
diff
changeset
|
78 </p><p>If you want to use the Apple system python, you will need to compile from source at this time - since most people prefer to leave the system python alone, and use the python downloaded from python.org. See <a href="http://pygame.org/wiki/MacCompile">http://pygame.org/wiki/MacCompile</a> for current instructions for compiling from source on Mac OSX. |
|
ea1264c694a8
install.txt was empty. install words made better.
Rene Dudfield <renesd@gmail.com>
parents:
978
diff
changeset
|
79 </p><p>pygame is also available from the fink, and macports distributions. |
| 579 | 80 </p><p> |
| 81 To build self-contained pygame applications, you should use py2app. | |
| 82 There is an example in: | |
| 83 <a href="file:///Developer/Python/pygame/Examples/macosx/aliens_app_example">/Developer/Python/pygame/Examples/macosx/aliens_app_example</a> | |
| 326 | 84 </p></blockquote><br> |
| 85 | |
| 444 | 86 <hr><br> |
| 326 | 87 |
| 88 <big><b><u>Installing From Source</u></b></big><blockquote><p> | |
| 89 Compiling and installing pygame is handled by Python's distutils. | |
| 90 Pygame also comes with some scripts to automatically configure | |
| 91 the flags needed to build pygame. Use the "setup.py" script to | |
| 92 start the installation. | |
| 93 <p></p> | |
| 495 | 94 The first time you run the setup script, it will call the |
| 444 | 95 "<tt>config.py</tt>" script. This will build a "<tt>Setup</tt>" file which |
| 326 | 96 stores all the information needed to compile. The "config.py" |
| 97 will do a good job of detecting what dependencies are available | |
| 98 and where they are located. If it isn't perfect, it is easy to | |
| 444 | 99 build your own, or edit the created "<tt>Setup</tt>" text file. This |
| 100 "<tt>Setup</tt>" file is a simple Makefile-like text file. It defines | |
| 326 | 101 variables needed to use each dependency, and then enables |
| 102 all the pygame modules with found dependencies. If you have | |
| 103 trouble compiling, you should be able to easily fix any problems | |
| 444 | 104 inside the "<tt>Setup</tt>" file. |
| 326 | 105 <p></p> |
| 444 | 106 Running the "<tt>setup.py</tt>" script will call distutils to build and |
| 326 | 107 install the pygame package. Distutils actually supports a wide |
| 444 | 108 variety of compile and install options. running "<tt>python setup.py help</tt>" |
| 326 | 109 will start to show you the different options available. You can |
| 110 change many things like install locations, compiler to use, and more. | |
| 111 Calling the "setup.py" script with no arguments and it will just | |
| 112 ask you if you want the default flags needed to compile and install. | |
| 113 </p></blockquote><br> | |
| 114 | |
| 115 <big><b><u>Windows Compiling Info</u></b></big><blockquote><p> | |
|
978
9876164d679e
Updated links and text. Linked to wiki for compiling from source instructions.
Rene Dudfield <renesd@gmail.com>
parents:
812
diff
changeset
|
116 |
|
9876164d679e
Updated links and text. Linked to wiki for compiling from source instructions.
Rene Dudfield <renesd@gmail.com>
parents:
812
diff
changeset
|
117 You can compile pygame on windows with mingw (gcc for windows) and also with visual studio. |
|
9876164d679e
Updated links and text. Linked to wiki for compiling from source instructions.
Rene Dudfield <renesd@gmail.com>
parents:
812
diff
changeset
|
118 |
|
9876164d679e
Updated links and text. Linked to wiki for compiling from source instructions.
Rene Dudfield <renesd@gmail.com>
parents:
812
diff
changeset
|
119 Up to date details can be found here: |
|
9876164d679e
Updated links and text. Linked to wiki for compiling from source instructions.
Rene Dudfield <renesd@gmail.com>
parents:
812
diff
changeset
|
120 <a href="http://pygame.org/wiki/CompileWindows">http://pygame.org/wiki/CompileWindows</a> |
|
9876164d679e
Updated links and text. Linked to wiki for compiling from source instructions.
Rene Dudfield <renesd@gmail.com>
parents:
812
diff
changeset
|
121 |
| 326 | 122 </p></blockquote><br> |
| 123 | |
|
978
9876164d679e
Updated links and text. Linked to wiki for compiling from source instructions.
Rene Dudfield <renesd@gmail.com>
parents:
812
diff
changeset
|
124 |
| 326 | 125 <big><b><u>Unix Compiling Info</u></b></big><blockquote><p> |
| 126 Compiling from linux shouldn't give you any problems. One thing | |
| 401 | 127 you must keep in mind is that most linux RPM packages separate the |
| 444 | 128 actual library from the "<tt>dev</tt>" files needed to compile. To build you |
| 129 will need to make sure the packages like "<tt>SDL-dev</tt>" are | |
| 326 | 130 installed. |
| 131 <p></p> | |
| 132 You can check to see if SDL is ready to be built from by running | |
| 495 | 133 the command <tt>sdl-config</tt> and seeing if it is found. If the |
| 444 | 134 <tt>sdl-config</tt> script is not on the path (or you have more than |
| 135 one?) Set the environment variable <tt>SDL_CONFIG</tt> to its location. | |
| 136 </p> | |
| 137 <p>Sometimes you will have the SDL libraries installed in once | |
| 138 location, and the other SDL libraries in another. This tricks the | |
| 139 pygame config scripts, but you can help it out by setting the | |
| 140 environment <tt>LOCALBASE</tt> to a path prefix where the other libraries | |
| 141 are. The common case for this is SDL installed in /usr and other | |
| 142 SDL libs installed in /usr/local. The command for this situation | |
| 143 is "<tt>LOCALBASE=/usr/local python setup.py install</tt>". | |
| 144 </blockquote><br> | |
| 326 | 145 |
| 579 | 146 <big><b><u>Mac OS X Compiling Info</u></b></big><blockquote><p> |
|
978
9876164d679e
Updated links and text. Linked to wiki for compiling from source instructions.
Rene Dudfield <renesd@gmail.com>
parents:
812
diff
changeset
|
147 |
|
9876164d679e
Updated links and text. Linked to wiki for compiling from source instructions.
Rene Dudfield <renesd@gmail.com>
parents:
812
diff
changeset
|
148 Up to date instructions for compiling on Mac OS X can be found here: |
|
9876164d679e
Updated links and text. Linked to wiki for compiling from source instructions.
Rene Dudfield <renesd@gmail.com>
parents:
812
diff
changeset
|
149 <a href="http://pygame.org/wiki/MacCompile">http://pygame.org/wiki/MacCompile</a> |
| 326 | 150 </p></blockquote><br> |
| 151 | |
|
978
9876164d679e
Updated links and text. Linked to wiki for compiling from source instructions.
Rene Dudfield <renesd@gmail.com>
parents:
812
diff
changeset
|
152 |
|
9876164d679e
Updated links and text. Linked to wiki for compiling from source instructions.
Rene Dudfield <renesd@gmail.com>
parents:
812
diff
changeset
|
153 |
|
9876164d679e
Updated links and text. Linked to wiki for compiling from source instructions.
Rene Dudfield <renesd@gmail.com>
parents:
812
diff
changeset
|
154 </body> |
|
9876164d679e
Updated links and text. Linked to wiki for compiling from source instructions.
Rene Dudfield <renesd@gmail.com>
parents:
812
diff
changeset
|
155 </html> |
