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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
327
81448bdcdc0f readme work
pygame
parents: 326
diff changeset
1 <html><head><!--
334
36de0455b66e documentation updates
pygame
parents: 330
diff changeset
2 Install Information
327
81448bdcdc0f readme work
pygame
parents: 326
diff changeset
3 --><title>Pygame Installation</title></head><body>
326
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
4 <h2 align=center>Pygame Installation</h2>
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
5
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
6 <p>
330
47da4433fad0 readme updates
pygame
parents: 329
diff changeset
7 Python can be built from source, but the easiest way is to
579
a92ba3b9a282 update docs
bob
parents: 495
diff changeset
8 get a binary package for your type of system and version of Python.
326
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
9 This document will give you information on either type of installation.
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
10 </p>
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
11
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
12 <big><b><u>Windows Binary Installer</u></b></big><blockquote><p>
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
13 This is probably the most popular method of installation. If you are
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
14 running on windows, it is highly recommended you use this form
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
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
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
17 </p><p>
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
18 The first thing you will need is an installation of Python. Python
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
19 binary installers make it easy to get this done. Pygame binaries
579
a92ba3b9a282 update docs
bob
parents: 495
diff changeset
20 usually come for the latest 2 releases of Python, so you'll want to be fairly
326
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
21 up to date.
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
22 <p></p>
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
23 Once that is in place, you want to download the appropriate
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
24 windows binary. From the pygame downloads page you can find the .EXE
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
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
8450ed98a72a readme updates
pygame
parents: 327
diff changeset
28 shouldn't have trouble finding the correct binary from the "Windows" section
8450ed98a72a readme updates
pygame
parents: 327
diff changeset
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
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
31 </p><p>
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
32 You will also probably want to install the windows documentation and
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
33 installation package. This will add easy links to the different documentation
329
8450ed98a72a readme updates
pygame
parents: 327
diff changeset
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
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
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
8450ed98a72a readme updates
pygame
parents: 327
diff changeset
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
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
45
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
46 <big><b><u>Unix Binary Packages</u></b></big><blockquote><p>
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
47 For many unix systems, the easiest way to install pygame is
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
48 from source. Still, there are binary packages available for
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
49 different distributions.
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
50 <p></p>
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
51 There are several binary RPM packages for linux machines. These are
401
9d8ed3295ea0 unicode cleanups
pygame
parents: 334
diff changeset
52 actually a little bit of work to install, since you will also need several
9d8ed3295ea0 unicode cleanups
pygame
parents: 334
diff changeset
53 RPM packages for the dependencies. There is a good chance
326
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
54 your linux distribution came with the needed dependencies (like Python
401
9d8ed3295ea0 unicode cleanups
pygame
parents: 334
diff changeset
55 and SDL). There are binary RPMs available from the website for each dependency.
326
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
56 </p><p>
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
57 For debian systems, pygame is actively maintained in the debian
444
23d06d9e31df update install instructions
pygame
parents: 401
diff changeset
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
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
60 </p><p>
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
61 FreeBSD also has an active pygame package. While techinicaly it
495
48a1b9476915 prep for 1.6
pygame
parents: 487
diff changeset
62 isn't binary, it is automatically built and installed by the
326
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
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
23d06d9e31df update install instructions
pygame
parents: 401
diff changeset
65 </p><p>
23d06d9e31df update install instructions
pygame
parents: 401
diff changeset
66 Gentoo has a builtin package for pygame. This is compiled for
23d06d9e31df update install instructions
pygame
parents: 401
diff changeset
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
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
69 </p></blockquote><br>
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
70
579
a92ba3b9a282 update docs
bob
parents: 495
diff changeset
71 <big><b><u>Mac OS X Binaries</u></b></big><blockquote><p>
a92ba3b9a282 update docs
bob
parents: 495
diff changeset
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
48a1b9476915 prep for 1.6
pygame
parents: 487
diff changeset
74 </p><p>
579
a92ba3b9a282 update docs
bob
parents: 495
diff changeset
75 This package includes almost of the dependencies required for pygame
a92ba3b9a282 update docs
bob
parents: 495
diff changeset
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
a92ba3b9a282 update docs
bob
parents: 495
diff changeset
80 </p><p>
a92ba3b9a282 update docs
bob
parents: 495
diff changeset
81 To build self-contained pygame applications, you should use py2app.
a92ba3b9a282 update docs
bob
parents: 495
diff changeset
82 There is an example in:
a92ba3b9a282 update docs
bob
parents: 495
diff changeset
83 <a href="file:///Developer/Python/pygame/Examples/macosx/aliens_app_example">/Developer/Python/pygame/Examples/macosx/aliens_app_example</a>
326
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
84 </p></blockquote><br>
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
85
444
23d06d9e31df update install instructions
pygame
parents: 401
diff changeset
86 <hr><br>
326
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
87
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
88 <big><b><u>Installing From Source</u></b></big><blockquote><p>
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
89 Compiling and installing pygame is handled by Python's distutils.
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
90 Pygame also comes with some scripts to automatically configure
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
91 the flags needed to build pygame. Use the "setup.py" script to
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
92 start the installation.
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
93 <p></p>
495
48a1b9476915 prep for 1.6
pygame
parents: 487
diff changeset
94 The first time you run the setup script, it will call the
444
23d06d9e31df update install instructions
pygame
parents: 401
diff changeset
95 "<tt>config.py</tt>" script. This will build a "<tt>Setup</tt>" file which
326
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
96 stores all the information needed to compile. The "config.py"
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
97 will do a good job of detecting what dependencies are available
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
98 and where they are located. If it isn't perfect, it is easy to
444
23d06d9e31df update install instructions
pygame
parents: 401
diff changeset
99 build your own, or edit the created "<tt>Setup</tt>" text file. This
23d06d9e31df update install instructions
pygame
parents: 401
diff changeset
100 "<tt>Setup</tt>" file is a simple Makefile-like text file. It defines
326
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
101 variables needed to use each dependency, and then enables
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
102 all the pygame modules with found dependencies. If you have
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
103 trouble compiling, you should be able to easily fix any problems
444
23d06d9e31df update install instructions
pygame
parents: 401
diff changeset
104 inside the "<tt>Setup</tt>" file.
326
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
105 <p></p>
444
23d06d9e31df update install instructions
pygame
parents: 401
diff changeset
106 Running the "<tt>setup.py</tt>" script will call distutils to build and
326
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
107 install the pygame package. Distutils actually supports a wide
444
23d06d9e31df update install instructions
pygame
parents: 401
diff changeset
108 variety of compile and install options. running "<tt>python setup.py help</tt>"
326
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
109 will start to show you the different options available. You can
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
110 change many things like install locations, compiler to use, and more.
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
111 Calling the "setup.py" script with no arguments and it will just
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
112 ask you if you want the default flags needed to compile and install.
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
113 </p></blockquote><br>
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
114
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
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
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
122 </p></blockquote><br>
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
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
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
125 <big><b><u>Unix Compiling Info</u></b></big><blockquote><p>
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
126 Compiling from linux shouldn't give you any problems. One thing
401
9d8ed3295ea0 unicode cleanups
pygame
parents: 334
diff changeset
127 you must keep in mind is that most linux RPM packages separate the
444
23d06d9e31df update install instructions
pygame
parents: 401
diff changeset
128 actual library from the "<tt>dev</tt>" files needed to compile. To build you
23d06d9e31df update install instructions
pygame
parents: 401
diff changeset
129 will need to make sure the packages like "<tt>SDL-dev</tt>" are
326
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
130 installed.
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
131 <p></p>
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
132 You can check to see if SDL is ready to be built from by running
495
48a1b9476915 prep for 1.6
pygame
parents: 487
diff changeset
133 the command <tt>sdl-config</tt> and seeing if it is found. If the
444
23d06d9e31df update install instructions
pygame
parents: 401
diff changeset
134 <tt>sdl-config</tt> script is not on the path (or you have more than
23d06d9e31df update install instructions
pygame
parents: 401
diff changeset
135 one?) Set the environment variable <tt>SDL_CONFIG</tt> to its location.
23d06d9e31df update install instructions
pygame
parents: 401
diff changeset
136 </p>
23d06d9e31df update install instructions
pygame
parents: 401
diff changeset
137 <p>Sometimes you will have the SDL libraries installed in once
23d06d9e31df update install instructions
pygame
parents: 401
diff changeset
138 location, and the other SDL libraries in another. This tricks the
23d06d9e31df update install instructions
pygame
parents: 401
diff changeset
139 pygame config scripts, but you can help it out by setting the
23d06d9e31df update install instructions
pygame
parents: 401
diff changeset
140 environment <tt>LOCALBASE</tt> to a path prefix where the other libraries
23d06d9e31df update install instructions
pygame
parents: 401
diff changeset
141 are. The common case for this is SDL installed in /usr and other
23d06d9e31df update install instructions
pygame
parents: 401
diff changeset
142 SDL libs installed in /usr/local. The command for this situation
23d06d9e31df update install instructions
pygame
parents: 401
diff changeset
143 is "<tt>LOCALBASE=/usr/local python setup.py install</tt>".
23d06d9e31df update install instructions
pygame
parents: 401
diff changeset
144 </blockquote><br>
326
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
145
579
a92ba3b9a282 update docs
bob
parents: 495
diff changeset
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
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
150 </p></blockquote><br>
c4ffd7ce6442 readme work
pygame
parents:
diff changeset
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>