blob: 38b3cca4d4d713e5545e77c03ec25cf5f6ce8111 [file] [log] [blame]
Jack Jansen601b2fd2002-04-23 19:50:53 +00001How to install Python 2.2.1 on your Macintosh
Jack Jansencbed91b2001-08-03 13:31:36 +00002---------------------------------------------
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 Jansen6bc62c42001-12-20 20:41:45 +00006use the Carbon version or not. For Mac OS X users: this version of Python
7does not run from the command line, it is a pure "Mac only" app. Use the standard
8unix Python from the commandline, the two Pythons will be merged in the future.
Jack Jansen2f9a9e32001-02-17 22:03:42 +00009
Jack Jansen028f2d52001-08-29 22:04:08 +000010You should definitely read the Relnotes file too, and the section below about
Jack Jansen5d528b72001-10-23 22:22:09 +000011toolbox module reorganization. You should also read :Misc:NEWS, which lists
12the general (non-mac-dependent) new features of this Python release.
Jack Jansen2f9a9e32001-02-17 22:03:42 +000013
Jack Jansenc1218bc2001-04-25 22:11:24 +000014A special note about the active installer: do not background it, it may hang
Jack Jansen2b73fe92001-03-27 21:38:55 +000015your machine. This is a general problem with Vise active installers, MindVision
16are working on it.
Jack Jansen8ef786e2001-03-15 14:27:09 +000017
Jack Jansen2f9a9e32001-02-17 22:03:42 +000018------
Jack Jansen83cab721997-08-26 13:25:06 +000019
20If this is your first encounter with Python: you definitely need the
21common user documentation (common to all platforms). You can find this
Jack Jansen538bd132000-10-19 21:58:27 +000022(in various forms) on www.pythonlabs.com, www.python.org and
23ftp.python.org. Through there, or via
24http://www.cwi.nl/~jack/macpython.html you can also find the most recent
25MacPython distribution.
Jack Jansen83cab721997-08-26 13:25:06 +000026
27Mac-specific documentation is included in this distribution in folder
28Mac:Demo. The documentation is sparse, but it will have to serve for
29now. The documentation is in HTML format, start with index.html.
30
Jack Jansencbe7b1c2001-03-06 22:42:12 +000031This installer installs MacPython for classic PPC MacOS, MacPython for Carbon
Jack Jansenb9526512001-12-27 23:01:18 +000032(OS X, OS 9 or OS 8 with CarbonLib installed) or both, depending on your
Jack Jansencbe7b1c2001-03-06 22:42:12 +000033configuration. By selecting custom install you can bypass these tests and
34install what you want.
Jack Jansenecbc1cc1998-01-06 12:13:16 +000035
Jack Jansenb9526512001-12-27 23:01:18 +000036If you want 68k support you will have get MacPython 1.5.2.
Jack Jansen965226b2000-09-14 20:58:24 +000037
Jack Jansen83cab721997-08-26 13:25:06 +000038What to install
39---------------
40
Jack Jansen12a37b72000-05-06 23:01:07 +000041The optional parts in this distribution are
Jack Jansen1a29ed72001-10-31 10:13:52 +000042- TK+PIL: Tkinter and support modules, plus Imaging, the Python image
43 manipulation package (allows you to read, write and display images and
44 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 Jansen1a29ed72001-10-31 10:13:52 +000046 This is the reason Classic MacPython is also installed on MacOSX: it
47 allows you to run Tkinter applications, albeit in the Classic 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 Jansen1a29ed72001-10-31 10:13:52 +000052 on matrices and such. This is the most recent version from the
53 sourceforge archive.
54 Numeric has moved from Extensions to :Lib:site-python, by the way,
55 see the release notes.
56- Developers kit: all header files and some tools and sample projects
57 to get you started on writing Python extensions if you have CodeWarrior.
Jack Jansen12a37b72000-05-06 23:01:07 +000058All these except the DevKit are installed with Easy Install.
Jack Jansen83cab721997-08-26 13:25:06 +000059
Jack Jansencbe7b1c2001-03-06 22:42:12 +000060After the installer finishes it automatically launches the appropriate
Jack Jansen1a29ed72001-10-31 10:13:52 +000061ConfigurePython applet, to finish configuration of your Python. If you
62run MacOS9 or later (or 8 with CarbonLib installed) you can switch
63back and forth between the classic and Carbon versions of Python by
64running either ConfigurePythonClassic or ConfigurePythonCarbon.
Jack Jansen83cab721997-08-26 13:25:06 +000065
Jack Jansen1a29ed72001-10-31 10:13:52 +000066Moving your Python installation after installing is generally not a
67good idea. If you have to do this anyway you should remove your
68preference file, run ConfigurePython and remove all .pyc
69files. (there's a script zappyc.py that does the latter).
Jack Jansen2e42bdd2000-11-14 20:37:37 +000070
Jack Jansen83cab721997-08-26 13:25:06 +000071If you don't have enough memory: the sizes choosen are somewhat
Jack Jansen1a29ed72001-10-31 10:13:52 +000072arbitrary, and they are as high as they are so that test.autotest runs
73with fewer problems. An average Python program can make do with much
74less memory. Try lowering the application sizes in the finder "get
75info" window, and seeing whether the resulting python is still usable.
Jack Jansen83cab721997-08-26 13:25:06 +000076
Jack Jansen83cab721997-08-26 13:25:06 +000077After installing
78----------------
79
Jack Jansen8a6cdcc2000-09-10 12:02:28 +000080It is probably a good idea to run the automatic tests. Start
Jack Jansenf7e57142001-09-08 21:38:26 +000081Python and "import test.regrtest ; test.regrtest.main()".
Jack Jansende519092000-10-12 21:21:43 +000082
Jack Jansenb3be2162001-11-30 14:16:36 +000083test_frozen will fail in MacPython because of different handling on
84frozen modules. This should not be a problem in normal use.
85
Jack Jansenf7e57142001-09-08 21:38:26 +000086Three tests will fail on MacOS9 with MemoryErrors:
Jack Jansen5d528b72001-10-23 22:22:09 +000087test_longexp, test_sha and test_zlib (on MacOSX these should pass).
Jack Jansen2b73fe92001-03-27 21:38:55 +000088
Jack Jansen1a29ed72001-10-31 10:13:52 +000089If you increase the PythonInterpreter memory partition size they will
90pass (but for longexp you have to increase it by an incredible amount,
91400MB is rumoured). It will, however, print some messages about
92optional features not supported. You should not worry about these,
93they are modules that are supported by Python on other
94platforms. Also, if you didn't run compileall before autotesting you
95may run out of memory the first time you run the tests. test_socket
96may also fail if you have no internet connection. Please also read the
97Relnotes file for other minor problems with this distribution.
Jack Jansen83cab721997-08-26 13:25:06 +000098
Jack Jansen1a29ed72001-10-31 10:13:52 +000099Using Python is most easily done from the IDE, which has a builtin
100editor, debugger and other goodies. The alternative is to use
101PythonInterpreter, which is the lowlevel interpreter with a
102console-window only (similar to Unix Python).
Jack Jansen83cab721997-08-26 13:25:06 +0000103
Jack Jansen1a29ed72001-10-31 10:13:52 +0000104If your program uses Tkinter you MUST run it under PythonInterpreter,
105Tkinter and IDE are incompatible and your program will fail in strange
106ways.
Jack Jansen8a6cdcc2000-09-10 12:02:28 +0000107
Jack Jansen601b2fd2002-04-23 19:50:53 +0000108OSX Multiple users note
109-----------------------
110
111Interaction with Mac OS X multiple users has been tested only very lightly.
112If you install as a privileged user everything installs fine.
113
114If you install as a non-privileged user everything should install in your local
115per-user folders. But: as there is no global PythonCore you can only run applets
116if they reside in your toplevel Python folder.
117
118If you install as a privileged user and then try to run
119Python as another (non-privileged) user you may encounter a problem with
120not having a preference file: the symptom is failing to import all sorts
121of standard modules. If you remove your per-user Python preference files
122(in ~/Library/Preferences) and then run PythonIntpreter once everything should
123be fine.
124
Jack Jansen0b726951997-10-08 15:34:42 +0000125Uninstalling
126------------
127
Jack Jansenb9526512001-12-27 23:01:18 +0000128Up to three items are installed in the system folder: the interpreter shared
129libraries PythonCore and PythonCoreCarbon live in the Extensions
Jack Jansen601b2fd2002-04-23 19:50:53 +0000130folder and the "Python 2.2.1 Preferences" file in the Python subfolder
Jack Jansen1a29ed72001-10-31 10:13:52 +0000131in the Preferences folder. All the rest of Python lives in the folder
132you installed in.
Jack Jansen0b726951997-10-08 15:34:42 +0000133
Jack Jansenb9526512001-12-27 23:01:18 +0000134On OSX the libraries are installed in /Library/CFMSupport. The ConfigurePython
135applets will complain if you have no right to create the libraries there
136(you need Admin privileges). This has one consequence: you will not be able to
137run applets unless they reside in the MacPython folder (such as the IDE or
138EditPythonPrefs). If you try to run an applet stored elsewhere you will
139get a "Cannot locate PythonCore" error message.
Jack Jansenc1218bc2001-04-25 22:11:24 +0000140
Jack Jansen83cab721997-08-26 13:25:06 +0000141Things to see
142-------------
143
Jack Jansen12a37b72000-05-06 23:01:07 +0000144Start off at Mac:Demo:index.html. Read at least the first few sections.
145
Jack Jansen8a6cdcc2000-09-10 12:02:28 +0000146There are also some interesting files in the "Relnotes" folder that may
Jack Jansen83cab721997-08-26 13:25:06 +0000147contain useful information. There is also a first stab at documentation
148(plus examples) in the Mac:Demo folder. The toplevel Demo folder has
Jack Jansen12a37b72000-05-06 23:01:07 +0000149machine-independent demos.
150The Mac:Lib:test folder also has some programs that show simple
Jack Jansen83cab721997-08-26 13:25:06 +0000151capabilities of various modules.
152
Jack Jansen1a29ed72001-10-31 10:13:52 +0000153The ":Mac:scripts" folder has some sample scripts. Some are useful,
154some are just interesting to look at to see how various things
155work. The MkDistr, mkapplet and fullbuild scripts (plus the ones
156mentioned above) may help you to understand how to use AppleEvents and
157various other toolboxes from python.
Jack Jansen83cab721997-08-26 13:25:06 +0000158
Jack Jansen1a29ed72001-10-31 10:13:52 +0000159Other mac-specific goodies can be found in :Mac:Tools, of which the
160IDE sources and a CGI framework deserve special mention.
Jack Jansen8a6cdcc2000-09-10 12:02:28 +0000161
Jack Jansen83cab721997-08-26 13:25:06 +0000162The 'img' group of modules, which handles I/O of many different image
Jack Jansend0ddb661998-04-27 15:14:36 +0000163formats is included, but without documentation. You can find docs at
164ftp://ftp.cwi.nl/pub/jack/python/img (or somewhere around there).
165
166Finally there is a Mac:Contrib folder which contains some contributed
Jack Jansen12a37b72000-05-06 23:01:07 +0000167software.
Jack Jansen83cab721997-08-26 13:25:06 +0000168
169Upgrading from older Python releases
170------------------------------------
171
Jack Jansen1a29ed72001-10-31 10:13:52 +0000172Python releases are independent of each other, with separate
173Preferences files, shared library names, etc. The good news is that
174this means you can keep your older version around if you are unsure
Jack Jansen83cab721997-08-26 13:25:06 +0000175whether to upgrade. The bad news is that your old preference settings
176are lost and you have to set them again.
177
Jack Jansen601b2fd2002-04-23 19:50:53 +0000178After you are satisfied that 2.2.1 works as expected you can trash
Jack Jansen83cab721997-08-26 13:25:06 +0000179anything in the system folder that has "python" in the name and not
Jack Jansen601b2fd2002-04-23 19:50:53 +0000180"2.2.1".
Jack Jansen83cab721997-08-26 13:25:06 +0000181
Jack Jansen1a29ed72001-10-31 10:13:52 +0000182The ConfigurePython... applets will try to detect incompatible
183preferences files and offer to remove them. This means that re-running
184ConfigurePython after a second install of the same MacPython version
185(or after moving the Python folder) should fix things up correctly.
Jack Jansen2b73fe92001-03-27 21:38:55 +0000186
Jack Jansen83cab721997-08-26 13:25:06 +0000187The installer
188-------------
189
Jack Jansen12a37b72000-05-06 23:01:07 +0000190The installer for this product was created using Installer VISE
191from MindVision Software. For more information on Installer VISE,
Jack Jansen83cab721997-08-26 13:25:06 +0000192contact:
193MindVision Software
1947201 North 7th Street
195Lincoln, NE 68521-8913
196Voice: 402-477-3269
197Fax: 402-477-1395
198Internet: mindvision@mindvision.com
199http://www.mindvision.com
200
Just van Rossumd16199a2001-12-13 12:58:09 +0000201Just van Rossum <just@letterror.com> created the initial version of the
Jack Jansen12a37b72000-05-06 23:01:07 +0000202installer (with Installer Vise Lite), and Jack worked from there.
Jack Jansen83cab721997-08-26 13:25:06 +0000203
Jack Jansen01ae9eb2000-04-22 22:57:25 +0000204Thanks!
205-------
206
Jack Jansen965226b2000-09-14 20:58:24 +0000207Thanks go to the whole Python community with Guido in the lead, of
208course. Mac-specific thanks go to the pythonmac-sig, Just van Rossum,
209Corran Webster, Tony Ingraldi, Erik van Blokland, Bill Bedford, Chris
210Stern, Gordon Worley, Oliver Steele, M. Papillon, Steven Majewski, David
Jack Jansen538bd132000-10-19 21:58:27 +0000211Goodger, Chris Barker, Luc Lefebvre, Tattoo Mabonzo K., Russell Finn,
Jack Jansenf7e57142001-09-08 21:38:26 +0000212Tom Bridgman, Russel Owen, Pascal Oberndoerfer, Dean Draayer,
Jack Jansen6bc62c42001-12-20 20:41:45 +0000213Alexandre Parenteau, Donovan Preston, Daniel Brotsky, Jason Harper,
Jack Jansenca800022002-04-22 13:56:25 +0000214Nitin Ganatra, Jacob Kaplan-Moss, Michael J. Barber, Tom Loredo,
215Christopher Smith,
Jack Jansende1d4952001-08-27 15:30:48 +0000216and all the other people who provided feedback, code or both!
Jack Jansen01ae9eb2000-04-22 22:57:25 +0000217
Jack Jansen1a29ed72001-10-31 10:13:52 +0000218MacPython includes waste, a TextEdit replacement which is (c) 1998
219Marco Piovanelli.
Jack Jansende519092000-10-12 21:21:43 +0000220
Jack Jansen1a29ed72001-10-31 10:13:52 +0000221A special mention is deserved by Matthias Neeracher, who has written
222the brilliant unix-compatible GUSI I/O library, without which
223MacPython would not have sockets or select, and to Alexandre
224Parenteau, who has ported this library to Carbon.
Jack Jansen9080e9b2001-01-23 21:03:52 +0000225
Jack Jansen83cab721997-08-26 13:25:06 +0000226Feedback
227--------
228
229Send bug reports, suggestions, contributions and fanmail to
Jack Jansenecbc1cc1998-01-06 12:13:16 +0000230<jack@cwi.nl>. However, a better way to discuss MacPython is to join the
Jack Jansen83cab721997-08-26 13:25:06 +0000231<pythonmac-sig@python.org> mailing list, which is explicitly meant for
232this purpose.
233
Jack Jansenb25ec912001-03-05 15:44:55 +0000234
Jack Jansen83cab721997-08-26 13:25:06 +0000235Jack Jansen
Jack Jansenb9526512001-12-27 23:01:18 +0000236CWI
237Kruislaan 413
2381098 SJ Amsterdam
Jack Jansen83cab721997-08-26 13:25:06 +0000239the Netherlands
240
241<jack@cwi.nl>, http://www.cwi.nl/~jack