blob: f95a94057256b85d840ad83adc450fca29a8a1e8 [file] [log] [blame]
Jack Jansencbe7b1c2001-03-06 22:42:12 +00001How to install Python 2.1b1 on your Macintosh
Jack Jansen2f9a9e32001-02-17 22:03:42 +00002---------------------------------------------
3
Jack Jansencbe7b1c2001-03-06 22:42:12 +00004This is the first beta for a MacPython that can run on classic MacOS (from 8.1
5onwards) and natively on MacOSX. The installer tries to work out whether you can
6use the Carbon version or not. This is also the first MacPython distribution
7to be packaged as an active installer, which only downloads the parts you actually
8need. Let me hear about problems in these areas.
Jack Jansen2f9a9e32001-02-17 22:03:42 +00009
10You should definitely read the Relnotes file too.
11
Jack Jansen8ef786e2001-03-15 14:27:09 +000012A special note about the active installer: do not background it, it will hang
13your machine.
14
Jack Jansen2f9a9e32001-02-17 22:03:42 +000015------
Jack Jansen83cab721997-08-26 13:25:06 +000016
17If this is your first encounter with Python: you definitely need the
18common user documentation (common to all platforms). You can find this
Jack Jansen538bd132000-10-19 21:58:27 +000019(in various forms) on www.pythonlabs.com, www.python.org and
20ftp.python.org. Through there, or via
21http://www.cwi.nl/~jack/macpython.html you can also find the most recent
22MacPython distribution.
Jack Jansen83cab721997-08-26 13:25:06 +000023
24Mac-specific documentation is included in this distribution in folder
25Mac:Demo. The documentation is sparse, but it will have to serve for
26now. The documentation is in HTML format, start with index.html.
27
Jack Jansend0ddb661998-04-27 15:14:36 +000028Caveats
29-------
Jack Jansen2f9a9e32001-02-17 22:03:42 +000030Aside from the general new Python 2.1 features compared to 2.0 the main
31feature of this release is Carbon support.
Jack Jansenffd61a62000-04-09 18:37:50 +000032
Jack Jansencbe7b1c2001-03-06 22:42:12 +000033This installer installs MacPython for classic PPC MacOS, MacPython for Carbon
34(OS X, OS 9 or OS8 with CarbonLib installed) or both, depending on your
35configuration. By selecting custom install you can bypass these tests and
36install what you want.
Jack Jansenecbc1cc1998-01-06 12:13:16 +000037
Jack Jansencbe7b1c2001-03-06 22:42:12 +000038If you want 68k support you will have to stay with 1.5.2.
Jack Jansen965226b2000-09-14 20:58:24 +000039
Jack Jansen83cab721997-08-26 13:25:06 +000040What to install
41---------------
42
Jack Jansen12a37b72000-05-06 23:01:07 +000043The optional parts in this distribution are
44- TK+PIL: Tkinter and support modules, plus Imaging, the Python image manipulation
45 package (allows you to read, write and display images and do lots of operations on them).
Jack Jansencbe7b1c2001-03-06 22:42:12 +000046 For Carbon MacPython you only get PIL: there is no Tcl/Tk for Carbon yet.
Jack Jansen12a37b72000-05-06 23:01:07 +000047- img: another imaging package. Has more file format support and is faster
48 than imaging, but has only limited operations on images. There is a bridge
49 between the packages.
50- Numeric: the LLNL Numeric Python extension. All sorts of nifty operations
Jack Jansen8a6cdcc2000-09-10 12:02:28 +000051 on matrices and such. This is the most recent version from the sourceforge archive.
Jack Jansencbe7b1c2001-03-06 22:42:12 +000052 Numeric has moved from Extensions to :Lib:site-python, by the way, see the release
53 notes.
Jack Jansen12a37b72000-05-06 23:01:07 +000054- Developers kit: all header files and some tools and sample projects to get you started on
55 writing Python extensions if you have CodeWarrior.
56All these except the DevKit are installed with Easy Install.
Jack Jansen83cab721997-08-26 13:25:06 +000057
Jack Jansencbe7b1c2001-03-06 22:42:12 +000058After the installer finishes it automatically launches the appropriate
59ConfigurePython applet, to finish configuration of your Python. If you run MacOS9
60(or 8 with CarbonLib installed) you can switch back and forth between the classic and
61Carbon versions of Python by running either ConfigurePythonClassic or ConfigurePythonCarbon.
Jack Jansen83cab721997-08-26 13:25:06 +000062
Jack Jansen2e42bdd2000-11-14 20:37:37 +000063Moving your Python installation after installing is generally not a good idea.
64If you have to do this anyway you should remove your preference file, run
Jack Jansen2f9a9e32001-02-17 22:03:42 +000065ConfigurePython and remove all .pyc files. (there's a script zappyc.py that does
66the latter).
Jack Jansen2e42bdd2000-11-14 20:37:37 +000067
Jack Jansen83cab721997-08-26 13:25:06 +000068If you don't have enough memory: the sizes choosen are somewhat
Jack Jansen9080e9b2001-01-23 21:03:52 +000069arbitrary, and they are as high as they are so that test.autotest runs with fewer
70problems. An average Python program can make do with much less memory.
71Try lowering the application sizes in the finder "get info"
72window, and seeing whether the resulting python is still usable.
Jack Jansen83cab721997-08-26 13:25:06 +000073
Jack Jansen83cab721997-08-26 13:25:06 +000074After installing
75----------------
76
Jack Jansen8a6cdcc2000-09-10 12:02:28 +000077It is probably a good idea to run the automatic tests. Start
Jack Jansende519092000-10-12 21:21:43 +000078Python and "import test.autotest".
79
Jack Jansencbe7b1c2001-03-06 22:42:12 +000080Three tests will fail on MacOS9, all with MemoryErrors: test_sha,
Jack Jansen2f9a9e32001-02-17 22:03:42 +000081test_longexp and test_zlib (on MacOSX nothing should fail).
82If you increase the PythonInterpreter memory
Jack Jansencbe7b1c2001-03-06 22:42:12 +000083partition size they will pass (but for longexp you have to increas it by an
84incredible amount). It will, however, print some messages
Jack Jansen2e42bdd2000-11-14 20:37:37 +000085about optional features not supported. You should not worry about these,
86they are modules that are supported by Python on other platforms. Also,
87if you didn't run compileall before autotesting you may run out of
88memory the first time you run the tests. test_socket may also fail if
89you have no internet connection. Please also read the Relnotes file for
90other minor problems with this distribution.
Jack Jansen83cab721997-08-26 13:25:06 +000091
Jack Jansen12a37b72000-05-06 23:01:07 +000092Using Python is most easily done from the IDE, which has a builtin editor,
93debugger and other goodies. The alternative is to use PythonInterpreter,
94which is the lowlevel interpreter with a console-window only (similar to Unix
95Python).
Jack Jansen83cab721997-08-26 13:25:06 +000096
Jack Jansen8a6cdcc2000-09-10 12:02:28 +000097If your program uses Tkinter you MUST run it under PythonInterpreter, Tkinter
98and IDE are incompatible and your program will fail in strange ways.
99
Jack Jansen0b726951997-10-08 15:34:42 +0000100Uninstalling
101------------
102
103Two items are installed in the system folder: the interpreter shared
Jack Jansen2f9a9e32001-02-17 22:03:42 +0000104libraries PythonCore and PythonCoreCarbon lives in the Extensions folder and the
Jack Jansencbe7b1c2001-03-06 22:42:12 +0000105"Python 2.1b1 Preferences" file in the Python subfolder in the
Jack Jansen8a6cdcc2000-09-10 12:02:28 +0000106Preferences folder. All the rest of Python lives in the folder you
107installed in.
Jack Jansen0b726951997-10-08 15:34:42 +0000108
Jack Jansen83cab721997-08-26 13:25:06 +0000109Things to see
110-------------
111
Jack Jansen12a37b72000-05-06 23:01:07 +0000112Start off at Mac:Demo:index.html. Read at least the first few sections.
113
Jack Jansen8a6cdcc2000-09-10 12:02:28 +0000114There are also some interesting files in the "Relnotes" folder that may
Jack Jansen83cab721997-08-26 13:25:06 +0000115contain useful information. There is also a first stab at documentation
116(plus examples) in the Mac:Demo folder. The toplevel Demo folder has
Jack Jansen12a37b72000-05-06 23:01:07 +0000117machine-independent demos.
118The Mac:Lib:test folder also has some programs that show simple
Jack Jansen83cab721997-08-26 13:25:06 +0000119capabilities of various modules.
120
Jack Jansen8a6cdcc2000-09-10 12:02:28 +0000121The ":Mac:scripts" folder has some sample scripts. Some are useful, some are
Jack Jansen83cab721997-08-26 13:25:06 +0000122just interesting to look at to see how various things work. The MkDistr,
123mkapplet and fullbuild scripts (plus the ones mentioned above) may help
124you to understand how to use AppleEvents and various other toolboxes
125from python.
126
Jack Jansen8a6cdcc2000-09-10 12:02:28 +0000127Other mac-specific goodies can be found in :Mac:Tools, of which the IDE sources
128and a CGI framework deserve special mention.
129
Jack Jansen83cab721997-08-26 13:25:06 +0000130The 'img' group of modules, which handles I/O of many different image
Jack Jansend0ddb661998-04-27 15:14:36 +0000131formats is included, but without documentation. You can find docs at
132ftp://ftp.cwi.nl/pub/jack/python/img (or somewhere around there).
133
134Finally there is a Mac:Contrib folder which contains some contributed
Jack Jansen12a37b72000-05-06 23:01:07 +0000135software.
Jack Jansen83cab721997-08-26 13:25:06 +0000136
137Upgrading from older Python releases
138------------------------------------
139
Jack Jansen2f9a9e32001-02-17 22:03:42 +0000140Python releases are independent of each other, with
Jack Jansen83cab721997-08-26 13:25:06 +0000141separate Preferences files, shared library names, etc. The good news is
142that this means you can keep your older version around if you are unsure
143whether to upgrade. The bad news is that your old preference settings
144are lost and you have to set them again.
145
Jack Jansen2f9a9e32001-02-17 22:03:42 +0000146After you are satisfied that 2.1 works as expected you can trash
Jack Jansen83cab721997-08-26 13:25:06 +0000147anything in the system folder that has "python" in the name and not
Jack Jansen2f9a9e32001-02-17 22:03:42 +0000148"2.1".
Jack Jansen83cab721997-08-26 13:25:06 +0000149
150The installer
151-------------
152
Jack Jansen12a37b72000-05-06 23:01:07 +0000153The installer for this product was created using Installer VISE
154from MindVision Software. For more information on Installer VISE,
Jack Jansen83cab721997-08-26 13:25:06 +0000155contact:
156MindVision Software
1577201 North 7th Street
158Lincoln, NE 68521-8913
159Voice: 402-477-3269
160Fax: 402-477-1395
161Internet: mindvision@mindvision.com
162http://www.mindvision.com
163
Jack Jansen12a37b72000-05-06 23:01:07 +0000164Just van Rossum <just@letterror.nl> created the initial version of the
165installer (with Installer Vise Lite), and Jack worked from there.
Jack Jansen83cab721997-08-26 13:25:06 +0000166
Jack Jansen01ae9eb2000-04-22 22:57:25 +0000167Thanks!
168-------
169
Jack Jansen965226b2000-09-14 20:58:24 +0000170Thanks go to the whole Python community with Guido in the lead, of
171course. Mac-specific thanks go to the pythonmac-sig, Just van Rossum,
172Corran Webster, Tony Ingraldi, Erik van Blokland, Bill Bedford, Chris
173Stern, Gordon Worley, Oliver Steele, M. Papillon, Steven Majewski, David
Jack Jansen538bd132000-10-19 21:58:27 +0000174Goodger, Chris Barker, Luc Lefebvre, Tattoo Mabonzo K., Russell Finn,
Jack Jansen8ef786e2001-03-15 14:27:09 +0000175Tom Bridgman Russel Owen and all the other people who provided feedback,
176code or both!
Jack Jansen01ae9eb2000-04-22 22:57:25 +0000177
Jack Jansende519092000-10-12 21:21:43 +0000178MacPython includes waste, a TextEdit replacement which is (c) 1998 Marco Piovanelli.
179
Jack Jansen9080e9b2001-01-23 21:03:52 +0000180A special mention is deserved by Matthias Neeracher, who has written the brilliant
181unix-compatible GUSI I/O library, without which MacPython would not have sockets
182or select, and to Alexandre Parenteau, who has ported this library to Carbon.
183
Jack Jansen83cab721997-08-26 13:25:06 +0000184Feedback
185--------
186
187Send bug reports, suggestions, contributions and fanmail to
Jack Jansenecbc1cc1998-01-06 12:13:16 +0000188<jack@cwi.nl>. However, a better way to discuss MacPython is to join the
Jack Jansen83cab721997-08-26 13:25:06 +0000189<pythonmac-sig@python.org> mailing list, which is explicitly meant for
190this purpose.
191
Jack Jansenb25ec912001-03-05 15:44:55 +0000192
Jack Jansen83cab721997-08-26 13:25:06 +0000193Jack Jansen
Jack Jansen12a37b72000-05-06 23:01:07 +0000194Oratrix Development BV
195Valeriusplein 30
196Amsterdam
Jack Jansen83cab721997-08-26 13:25:06 +0000197the Netherlands
198
199<jack@cwi.nl>, http://www.cwi.nl/~jack