blob: 86b7a45de3121f72fabd52dcda95c5cdccc808ad [file] [log] [blame]
Jack Jansencbed91b2001-08-03 13:31:36 +00001How to install Python 2.1.1 on your Macintosh
2---------------------------------------------
Jack Jansen2f9a9e32001-02-17 22:03:42 +00003
Jack Jansenc1218bc2001-04-25 22:11:24 +00004This is a MacPython that can run on classic MacOS (from 8.1
Jack Jansencbe7b1c2001-03-06 22:42:12 +00005onwards) and natively on MacOSX. The installer tries to work out whether you can
Jack Jansencbed91b2001-08-03 13:31:36 +00006use the Carbon version or not.
Jack Jansen2f9a9e32001-02-17 22:03:42 +00007
8You should definitely read the Relnotes file too.
9
Jack Jansenc1218bc2001-04-25 22:11:24 +000010A special note about the active installer: do not background it, it may hang
Jack Jansen2b73fe92001-03-27 21:38:55 +000011your machine. This is a general problem with Vise active installers, MindVision
12are working on it.
Jack Jansen8ef786e2001-03-15 14:27:09 +000013
Jack Jansen2f9a9e32001-02-17 22:03:42 +000014------
Jack Jansen83cab721997-08-26 13:25:06 +000015
16If this is your first encounter with Python: you definitely need the
17common user documentation (common to all platforms). You can find this
Jack Jansen538bd132000-10-19 21:58:27 +000018(in various forms) on www.pythonlabs.com, www.python.org and
19ftp.python.org. Through there, or via
20http://www.cwi.nl/~jack/macpython.html you can also find the most recent
21MacPython distribution.
Jack Jansen83cab721997-08-26 13:25:06 +000022
23Mac-specific documentation is included in this distribution in folder
24Mac:Demo. The documentation is sparse, but it will have to serve for
25now. The documentation is in HTML format, start with index.html.
26
Jack Jansend0ddb661998-04-27 15:14:36 +000027Caveats
28-------
Jack Jansencbed91b2001-08-03 13:31:36 +000029Aside from the general new Python 2.1.1 features compared to 2.0 the main
Jack Jansen2f9a9e32001-02-17 22:03:42 +000030feature of this release is Carbon support.
Jack Jansenffd61a62000-04-09 18:37:50 +000031
Jack Jansencbe7b1c2001-03-06 22:42:12 +000032This installer installs MacPython for classic PPC MacOS, MacPython for Carbon
33(OS X, OS 9 or OS8 with CarbonLib installed) or both, depending on your
34configuration. By selecting custom install you can bypass these tests and
35install what you want.
Jack Jansenecbc1cc1998-01-06 12:13:16 +000036
Jack Jansen2b73fe92001-03-27 21:38:55 +000037If you want 68k support you will have to stay with MacPython 1.5.2.
Jack Jansen965226b2000-09-14 20:58:24 +000038
Jack Jansen83cab721997-08-26 13:25:06 +000039What to install
40---------------
41
Jack Jansen12a37b72000-05-06 23:01:07 +000042The optional parts in this distribution are
43- TK+PIL: Tkinter and support modules, plus Imaging, the Python image manipulation
44 package (allows you to read, write and display images and do lots of operations on them).
Jack Jansencbe7b1c2001-03-06 22:42:12 +000045 For Carbon MacPython you only get PIL: there is no Tcl/Tk for Carbon yet.
Jack Jansen2b73fe92001-03-27 21:38:55 +000046 This is the reason Classic MacPython is also installed on MacOSX: it allows you
47 to run Tkinter applications, albeit in the MacOS9 box.
Jack Jansen12a37b72000-05-06 23:01:07 +000048- img: another imaging package. Has more file format support and is faster
49 than imaging, but has only limited operations on images. There is a bridge
50 between the packages.
51- Numeric: the LLNL Numeric Python extension. All sorts of nifty operations
Jack Jansen8a6cdcc2000-09-10 12:02:28 +000052 on matrices and such. This is the most recent version from the sourceforge archive.
Jack Jansencbe7b1c2001-03-06 22:42:12 +000053 Numeric has moved from Extensions to :Lib:site-python, by the way, see the release
54 notes.
Jack Jansen12a37b72000-05-06 23:01:07 +000055- Developers kit: all header files and some tools and sample projects to get you started on
56 writing Python extensions if you have CodeWarrior.
57All these except the DevKit are installed with Easy Install.
Jack Jansen83cab721997-08-26 13:25:06 +000058
Jack Jansencbe7b1c2001-03-06 22:42:12 +000059After the installer finishes it automatically launches the appropriate
Jack Jansen2b73fe92001-03-27 21:38:55 +000060ConfigurePython applet, to finish configuration of your Python. If you run MacOS9 or later
Jack Jansencbe7b1c2001-03-06 22:42:12 +000061(or 8 with CarbonLib installed) you can switch back and forth between the classic and
62Carbon versions of Python by running either ConfigurePythonClassic or ConfigurePythonCarbon.
Jack Jansen83cab721997-08-26 13:25:06 +000063
Jack Jansen2e42bdd2000-11-14 20:37:37 +000064Moving your Python installation after installing is generally not a good idea.
65If you have to do this anyway you should remove your preference file, run
Jack Jansen2f9a9e32001-02-17 22:03:42 +000066ConfigurePython and remove all .pyc files. (there's a script zappyc.py that does
67the latter).
Jack Jansen2e42bdd2000-11-14 20:37:37 +000068
Jack Jansen83cab721997-08-26 13:25:06 +000069If you don't have enough memory: the sizes choosen are somewhat
Jack Jansen9080e9b2001-01-23 21:03:52 +000070arbitrary, and they are as high as they are so that test.autotest runs with fewer
71problems. An average Python program can make do with much less memory.
72Try lowering the application sizes in the finder "get info"
73window, and seeing whether the resulting python is still usable.
Jack Jansen83cab721997-08-26 13:25:06 +000074
Jack Jansen83cab721997-08-26 13:25:06 +000075After installing
76----------------
77
Jack Jansen8a6cdcc2000-09-10 12:02:28 +000078It is probably a good idea to run the automatic tests. Start
Jack Jansende519092000-10-12 21:21:43 +000079Python and "import test.autotest".
80
Jack Jansencbed91b2001-08-03 13:31:36 +000081Three tests will fail on MacOS9, all with MemoryErrors:
82test_longexp, test_sha and test_zlib (on MacOSX nothing should fail).
Jack Jansen2b73fe92001-03-27 21:38:55 +000083
Jack Jansen2f9a9e32001-02-17 22:03:42 +000084If you increase the PythonInterpreter memory
Jack Jansen2b73fe92001-03-27 21:38:55 +000085partition size they will pass (but for longexp you have to increase it by an
Jack Jansen99e607a2001-05-10 12:20:30 +000086incredible amount, 400MB is rumoured). It will, however, print some messages
Jack Jansen2e42bdd2000-11-14 20:37:37 +000087about optional features not supported. You should not worry about these,
88they are modules that are supported by Python on other platforms. Also,
89if you didn't run compileall before autotesting you may run out of
90memory the first time you run the tests. test_socket may also fail if
91you have no internet connection. Please also read the Relnotes file for
92other minor problems with this distribution.
Jack Jansen83cab721997-08-26 13:25:06 +000093
Jack Jansen12a37b72000-05-06 23:01:07 +000094Using Python is most easily done from the IDE, which has a builtin editor,
95debugger and other goodies. The alternative is to use PythonInterpreter,
96which is the lowlevel interpreter with a console-window only (similar to Unix
97Python).
Jack Jansen83cab721997-08-26 13:25:06 +000098
Jack Jansen8a6cdcc2000-09-10 12:02:28 +000099If your program uses Tkinter you MUST run it under PythonInterpreter, Tkinter
100and IDE are incompatible and your program will fail in strange ways.
101
Jack Jansen0b726951997-10-08 15:34:42 +0000102Uninstalling
103------------
104
105Two items are installed in the system folder: the interpreter shared
Jack Jansen2f9a9e32001-02-17 22:03:42 +0000106libraries PythonCore and PythonCoreCarbon lives in the Extensions folder and the
Jack Jansencbed91b2001-08-03 13:31:36 +0000107"Python 2.1.1 Preferences" file in the Python subfolder in the
Jack Jansen8a6cdcc2000-09-10 12:02:28 +0000108Preferences folder. All the rest of Python lives in the folder you
109installed in.
Jack Jansen0b726951997-10-08 15:34:42 +0000110
Jack Jansenc1218bc2001-04-25 22:11:24 +0000111On OSX the libraries are installed in /Library/CFMSupport. There is a nasty bug
112in OSX that is triggered by Python: if any orphaned aliases are left in
113/Library/CFMSupport your machine will start to behave very badly. 2.1
114beta installers triggered this problem if you simply threw away your Python folder,
115so if you installed a 2.1beta you should clean out the aliases in /Library/CFMSupport
Jack Jansencbed91b2001-08-03 13:31:36 +0000116too. The final 2.1 installer always copied the shared libraries on OSX, so it does
Jack Jansenc1218bc2001-04-25 22:11:24 +0000117not have the problem anymore.
118
Jack Jansen83cab721997-08-26 13:25:06 +0000119Things to see
120-------------
121
Jack Jansen12a37b72000-05-06 23:01:07 +0000122Start off at Mac:Demo:index.html. Read at least the first few sections.
123
Jack Jansen8a6cdcc2000-09-10 12:02:28 +0000124There are also some interesting files in the "Relnotes" folder that may
Jack Jansen83cab721997-08-26 13:25:06 +0000125contain useful information. There is also a first stab at documentation
126(plus examples) in the Mac:Demo folder. The toplevel Demo folder has
Jack Jansen12a37b72000-05-06 23:01:07 +0000127machine-independent demos.
128The Mac:Lib:test folder also has some programs that show simple
Jack Jansen83cab721997-08-26 13:25:06 +0000129capabilities of various modules.
130
Jack Jansen8a6cdcc2000-09-10 12:02:28 +0000131The ":Mac:scripts" folder has some sample scripts. Some are useful, some are
Jack Jansen83cab721997-08-26 13:25:06 +0000132just interesting to look at to see how various things work. The MkDistr,
133mkapplet and fullbuild scripts (plus the ones mentioned above) may help
134you to understand how to use AppleEvents and various other toolboxes
135from python.
136
Jack Jansen8a6cdcc2000-09-10 12:02:28 +0000137Other mac-specific goodies can be found in :Mac:Tools, of which the IDE sources
138and a CGI framework deserve special mention.
139
Jack Jansen83cab721997-08-26 13:25:06 +0000140The 'img' group of modules, which handles I/O of many different image
Jack Jansend0ddb661998-04-27 15:14:36 +0000141formats is included, but without documentation. You can find docs at
142ftp://ftp.cwi.nl/pub/jack/python/img (or somewhere around there).
143
144Finally there is a Mac:Contrib folder which contains some contributed
Jack Jansen12a37b72000-05-06 23:01:07 +0000145software.
Jack Jansen83cab721997-08-26 13:25:06 +0000146
147Upgrading from older Python releases
148------------------------------------
149
Jack Jansen2f9a9e32001-02-17 22:03:42 +0000150Python releases are independent of each other, with
Jack Jansen83cab721997-08-26 13:25:06 +0000151separate Preferences files, shared library names, etc. The good news is
152that this means you can keep your older version around if you are unsure
153whether to upgrade. The bad news is that your old preference settings
154are lost and you have to set them again.
155
Jack Jansencbed91b2001-08-03 13:31:36 +0000156After you are satisfied that 2.1.1 works as expected you can trash
Jack Jansen83cab721997-08-26 13:25:06 +0000157anything in the system folder that has "python" in the name and not
Jack Jansencbed91b2001-08-03 13:31:36 +0000158"2.1.1".
Jack Jansen83cab721997-08-26 13:25:06 +0000159
Jack Jansen2b73fe92001-03-27 21:38:55 +0000160As of 2.1 the ConfigurePython applets will try to detect incompatible preferences
161files and offer to remove them. This means that re-running ConfigurePython after
162a second install of the same MacPython version (or after moving the Python folder)
163should fix things up correctly.
164
Jack Jansen83cab721997-08-26 13:25:06 +0000165The installer
166-------------
167
Jack Jansen12a37b72000-05-06 23:01:07 +0000168The installer for this product was created using Installer VISE
169from MindVision Software. For more information on Installer VISE,
Jack Jansen83cab721997-08-26 13:25:06 +0000170contact:
171MindVision Software
1727201 North 7th Street
173Lincoln, NE 68521-8913
174Voice: 402-477-3269
175Fax: 402-477-1395
176Internet: mindvision@mindvision.com
177http://www.mindvision.com
178
Jack Jansen12a37b72000-05-06 23:01:07 +0000179Just van Rossum <just@letterror.nl> created the initial version of the
180installer (with Installer Vise Lite), and Jack worked from there.
Jack Jansen83cab721997-08-26 13:25:06 +0000181
Jack Jansen01ae9eb2000-04-22 22:57:25 +0000182Thanks!
183-------
184
Jack Jansen965226b2000-09-14 20:58:24 +0000185Thanks go to the whole Python community with Guido in the lead, of
186course. Mac-specific thanks go to the pythonmac-sig, Just van Rossum,
187Corran Webster, Tony Ingraldi, Erik van Blokland, Bill Bedford, Chris
188Stern, Gordon Worley, Oliver Steele, M. Papillon, Steven Majewski, David
Jack Jansen538bd132000-10-19 21:58:27 +0000189Goodger, Chris Barker, Luc Lefebvre, Tattoo Mabonzo K., Russell Finn,
Jack Jansencbed91b2001-08-03 13:31:36 +0000190Tom Bridgman, Russel Owen, Pascal Oberndoerfer and all the other people
191who provided feedback, code or both!
Jack Jansen01ae9eb2000-04-22 22:57:25 +0000192
Jack Jansende519092000-10-12 21:21:43 +0000193MacPython includes waste, a TextEdit replacement which is (c) 1998 Marco Piovanelli.
194
Jack Jansen9080e9b2001-01-23 21:03:52 +0000195A special mention is deserved by Matthias Neeracher, who has written the brilliant
196unix-compatible GUSI I/O library, without which MacPython would not have sockets
197or select, and to Alexandre Parenteau, who has ported this library to Carbon.
198
Jack Jansen83cab721997-08-26 13:25:06 +0000199Feedback
200--------
201
202Send bug reports, suggestions, contributions and fanmail to
Jack Jansenecbc1cc1998-01-06 12:13:16 +0000203<jack@cwi.nl>. However, a better way to discuss MacPython is to join the
Jack Jansen83cab721997-08-26 13:25:06 +0000204<pythonmac-sig@python.org> mailing list, which is explicitly meant for
205this purpose.
206
Jack Jansenb25ec912001-03-05 15:44:55 +0000207
Jack Jansen83cab721997-08-26 13:25:06 +0000208Jack Jansen
Jack Jansen12a37b72000-05-06 23:01:07 +0000209Oratrix Development BV
210Valeriusplein 30
211Amsterdam
Jack Jansen83cab721997-08-26 13:25:06 +0000212the Netherlands
213
214<jack@cwi.nl>, http://www.cwi.nl/~jack