Jack Jansen | 601b2fd | 2002-04-23 19:50:53 +0000 | [diff] [blame] | 1 | How to install Python 2.2.1 on your Macintosh |
Jack Jansen | cbed91b | 2001-08-03 13:31:36 +0000 | [diff] [blame] | 2 | --------------------------------------------- |
Jack Jansen | 2f9a9e3 | 2001-02-17 22:03:42 +0000 | [diff] [blame] | 3 | |
Jack Jansen | c1218bc | 2001-04-25 22:11:24 +0000 | [diff] [blame] | 4 | This is a MacPython that can run on classic MacOS (from 8.1 |
Jack Jansen | cbe7b1c | 2001-03-06 22:42:12 +0000 | [diff] [blame] | 5 | onwards) and natively on MacOSX. The installer tries to work out whether you can |
Jack Jansen | 6bc62c4 | 2001-12-20 20:41:45 +0000 | [diff] [blame] | 6 | use the Carbon version or not. For Mac OS X users: this version of Python |
| 7 | does not run from the command line, it is a pure "Mac only" app. Use the standard |
| 8 | unix Python from the commandline, the two Pythons will be merged in the future. |
Jack Jansen | 2f9a9e3 | 2001-02-17 22:03:42 +0000 | [diff] [blame] | 9 | |
Jack Jansen | 028f2d5 | 2001-08-29 22:04:08 +0000 | [diff] [blame] | 10 | You should definitely read the Relnotes file too, and the section below about |
Jack Jansen | 5d528b7 | 2001-10-23 22:22:09 +0000 | [diff] [blame] | 11 | toolbox module reorganization. You should also read :Misc:NEWS, which lists |
| 12 | the general (non-mac-dependent) new features of this Python release. |
Jack Jansen | 2f9a9e3 | 2001-02-17 22:03:42 +0000 | [diff] [blame] | 13 | |
Jack Jansen | c1218bc | 2001-04-25 22:11:24 +0000 | [diff] [blame] | 14 | A special note about the active installer: do not background it, it may hang |
Jack Jansen | 2b73fe9 | 2001-03-27 21:38:55 +0000 | [diff] [blame] | 15 | your machine. This is a general problem with Vise active installers, MindVision |
| 16 | are working on it. |
Jack Jansen | 8ef786e | 2001-03-15 14:27:09 +0000 | [diff] [blame] | 17 | |
Jack Jansen | 2f9a9e3 | 2001-02-17 22:03:42 +0000 | [diff] [blame] | 18 | ------ |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 19 | |
| 20 | If this is your first encounter with Python: you definitely need the |
| 21 | common user documentation (common to all platforms). You can find this |
Jack Jansen | 538bd13 | 2000-10-19 21:58:27 +0000 | [diff] [blame] | 22 | (in various forms) on www.pythonlabs.com, www.python.org and |
| 23 | ftp.python.org. Through there, or via |
| 24 | http://www.cwi.nl/~jack/macpython.html you can also find the most recent |
| 25 | MacPython distribution. |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 26 | |
| 27 | Mac-specific documentation is included in this distribution in folder |
| 28 | Mac:Demo. The documentation is sparse, but it will have to serve for |
| 29 | now. The documentation is in HTML format, start with index.html. |
| 30 | |
Jack Jansen | cbe7b1c | 2001-03-06 22:42:12 +0000 | [diff] [blame] | 31 | This installer installs MacPython for classic PPC MacOS, MacPython for Carbon |
Jack Jansen | b952651 | 2001-12-27 23:01:18 +0000 | [diff] [blame] | 32 | (OS X, OS 9 or OS 8 with CarbonLib installed) or both, depending on your |
Jack Jansen | cbe7b1c | 2001-03-06 22:42:12 +0000 | [diff] [blame] | 33 | configuration. By selecting custom install you can bypass these tests and |
| 34 | install what you want. |
Jack Jansen | ecbc1cc | 1998-01-06 12:13:16 +0000 | [diff] [blame] | 35 | |
Jack Jansen | b952651 | 2001-12-27 23:01:18 +0000 | [diff] [blame] | 36 | If you want 68k support you will have get MacPython 1.5.2. |
Jack Jansen | 965226b | 2000-09-14 20:58:24 +0000 | [diff] [blame] | 37 | |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 38 | What to install |
| 39 | --------------- |
| 40 | |
Jack Jansen | 12a37b7 | 2000-05-06 23:01:07 +0000 | [diff] [blame] | 41 | The optional parts in this distribution are |
Jack Jansen | 1a29ed7 | 2001-10-31 10:13:52 +0000 | [diff] [blame] | 42 | - 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 Jansen | cbe7b1c | 2001-03-06 22:42:12 +0000 | [diff] [blame] | 45 | For Carbon MacPython you only get PIL: there is no Tcl/Tk for Carbon yet. |
Jack Jansen | 1a29ed7 | 2001-10-31 10:13:52 +0000 | [diff] [blame] | 46 | 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 Jansen | 12a37b7 | 2000-05-06 23:01:07 +0000 | [diff] [blame] | 48 | - 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 Jansen | 1a29ed7 | 2001-10-31 10:13:52 +0000 | [diff] [blame] | 52 | 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 Jansen | 12a37b7 | 2000-05-06 23:01:07 +0000 | [diff] [blame] | 58 | All these except the DevKit are installed with Easy Install. |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 59 | |
Jack Jansen | cbe7b1c | 2001-03-06 22:42:12 +0000 | [diff] [blame] | 60 | After the installer finishes it automatically launches the appropriate |
Jack Jansen | 1a29ed7 | 2001-10-31 10:13:52 +0000 | [diff] [blame] | 61 | ConfigurePython applet, to finish configuration of your Python. If you |
| 62 | run MacOS9 or later (or 8 with CarbonLib installed) you can switch |
| 63 | back and forth between the classic and Carbon versions of Python by |
| 64 | running either ConfigurePythonClassic or ConfigurePythonCarbon. |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 65 | |
Jack Jansen | 1a29ed7 | 2001-10-31 10:13:52 +0000 | [diff] [blame] | 66 | Moving your Python installation after installing is generally not a |
| 67 | good idea. If you have to do this anyway you should remove your |
| 68 | preference file, run ConfigurePython and remove all .pyc |
| 69 | files. (there's a script zappyc.py that does the latter). |
Jack Jansen | 2e42bdd | 2000-11-14 20:37:37 +0000 | [diff] [blame] | 70 | |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 71 | If you don't have enough memory: the sizes choosen are somewhat |
Jack Jansen | 1a29ed7 | 2001-10-31 10:13:52 +0000 | [diff] [blame] | 72 | arbitrary, and they are as high as they are so that test.autotest runs |
| 73 | with fewer problems. An average Python program can make do with much |
| 74 | less memory. Try lowering the application sizes in the finder "get |
| 75 | info" window, and seeing whether the resulting python is still usable. |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 76 | |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 77 | After installing |
| 78 | ---------------- |
| 79 | |
Jack Jansen | 8a6cdcc | 2000-09-10 12:02:28 +0000 | [diff] [blame] | 80 | It is probably a good idea to run the automatic tests. Start |
Jack Jansen | f7e5714 | 2001-09-08 21:38:26 +0000 | [diff] [blame] | 81 | Python and "import test.regrtest ; test.regrtest.main()". |
Jack Jansen | de51909 | 2000-10-12 21:21:43 +0000 | [diff] [blame] | 82 | |
Jack Jansen | b3be216 | 2001-11-30 14:16:36 +0000 | [diff] [blame] | 83 | test_frozen will fail in MacPython because of different handling on |
| 84 | frozen modules. This should not be a problem in normal use. |
| 85 | |
Jack Jansen | f7e5714 | 2001-09-08 21:38:26 +0000 | [diff] [blame] | 86 | Three tests will fail on MacOS9 with MemoryErrors: |
Jack Jansen | 5d528b7 | 2001-10-23 22:22:09 +0000 | [diff] [blame] | 87 | test_longexp, test_sha and test_zlib (on MacOSX these should pass). |
Jack Jansen | 2b73fe9 | 2001-03-27 21:38:55 +0000 | [diff] [blame] | 88 | |
Jack Jansen | 1a29ed7 | 2001-10-31 10:13:52 +0000 | [diff] [blame] | 89 | If you increase the PythonInterpreter memory partition size they will |
| 90 | pass (but for longexp you have to increase it by an incredible amount, |
| 91 | 400MB is rumoured). It will, however, print some messages about |
| 92 | optional features not supported. You should not worry about these, |
| 93 | they are modules that are supported by Python on other |
| 94 | platforms. Also, if you didn't run compileall before autotesting you |
| 95 | may run out of memory the first time you run the tests. test_socket |
| 96 | may also fail if you have no internet connection. Please also read the |
| 97 | Relnotes file for other minor problems with this distribution. |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 98 | |
Jack Jansen | 1a29ed7 | 2001-10-31 10:13:52 +0000 | [diff] [blame] | 99 | Using Python is most easily done from the IDE, which has a builtin |
| 100 | editor, debugger and other goodies. The alternative is to use |
| 101 | PythonInterpreter, which is the lowlevel interpreter with a |
| 102 | console-window only (similar to Unix Python). |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 103 | |
Jack Jansen | 1a29ed7 | 2001-10-31 10:13:52 +0000 | [diff] [blame] | 104 | If your program uses Tkinter you MUST run it under PythonInterpreter, |
| 105 | Tkinter and IDE are incompatible and your program will fail in strange |
| 106 | ways. |
Jack Jansen | 8a6cdcc | 2000-09-10 12:02:28 +0000 | [diff] [blame] | 107 | |
Jack Jansen | 601b2fd | 2002-04-23 19:50:53 +0000 | [diff] [blame] | 108 | OSX Multiple users note |
| 109 | ----------------------- |
| 110 | |
| 111 | Interaction with Mac OS X multiple users has been tested only very lightly. |
| 112 | If you install as a privileged user everything installs fine. |
| 113 | |
| 114 | If you install as a non-privileged user everything should install in your local |
| 115 | per-user folders. But: as there is no global PythonCore you can only run applets |
| 116 | if they reside in your toplevel Python folder. |
| 117 | |
| 118 | If you install as a privileged user and then try to run |
| 119 | Python as another (non-privileged) user you may encounter a problem with |
| 120 | not having a preference file: the symptom is failing to import all sorts |
| 121 | of standard modules. If you remove your per-user Python preference files |
| 122 | (in ~/Library/Preferences) and then run PythonIntpreter once everything should |
| 123 | be fine. |
| 124 | |
Jack Jansen | 0b72695 | 1997-10-08 15:34:42 +0000 | [diff] [blame] | 125 | Uninstalling |
| 126 | ------------ |
| 127 | |
Jack Jansen | b952651 | 2001-12-27 23:01:18 +0000 | [diff] [blame] | 128 | Up to three items are installed in the system folder: the interpreter shared |
| 129 | libraries PythonCore and PythonCoreCarbon live in the Extensions |
Jack Jansen | 601b2fd | 2002-04-23 19:50:53 +0000 | [diff] [blame] | 130 | folder and the "Python 2.2.1 Preferences" file in the Python subfolder |
Jack Jansen | 1a29ed7 | 2001-10-31 10:13:52 +0000 | [diff] [blame] | 131 | in the Preferences folder. All the rest of Python lives in the folder |
| 132 | you installed in. |
Jack Jansen | 0b72695 | 1997-10-08 15:34:42 +0000 | [diff] [blame] | 133 | |
Jack Jansen | b952651 | 2001-12-27 23:01:18 +0000 | [diff] [blame] | 134 | On OSX the libraries are installed in /Library/CFMSupport. The ConfigurePython |
| 135 | applets 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 |
| 137 | run applets unless they reside in the MacPython folder (such as the IDE or |
| 138 | EditPythonPrefs). If you try to run an applet stored elsewhere you will |
| 139 | get a "Cannot locate PythonCore" error message. |
Jack Jansen | c1218bc | 2001-04-25 22:11:24 +0000 | [diff] [blame] | 140 | |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 141 | Things to see |
| 142 | ------------- |
| 143 | |
Jack Jansen | 12a37b7 | 2000-05-06 23:01:07 +0000 | [diff] [blame] | 144 | Start off at Mac:Demo:index.html. Read at least the first few sections. |
| 145 | |
Jack Jansen | 8a6cdcc | 2000-09-10 12:02:28 +0000 | [diff] [blame] | 146 | There are also some interesting files in the "Relnotes" folder that may |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 147 | contain useful information. There is also a first stab at documentation |
| 148 | (plus examples) in the Mac:Demo folder. The toplevel Demo folder has |
Jack Jansen | 12a37b7 | 2000-05-06 23:01:07 +0000 | [diff] [blame] | 149 | machine-independent demos. |
| 150 | The Mac:Lib:test folder also has some programs that show simple |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 151 | capabilities of various modules. |
| 152 | |
Jack Jansen | 1a29ed7 | 2001-10-31 10:13:52 +0000 | [diff] [blame] | 153 | The ":Mac:scripts" folder has some sample scripts. Some are useful, |
| 154 | some are just interesting to look at to see how various things |
| 155 | work. The MkDistr, mkapplet and fullbuild scripts (plus the ones |
| 156 | mentioned above) may help you to understand how to use AppleEvents and |
| 157 | various other toolboxes from python. |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 158 | |
Jack Jansen | 1a29ed7 | 2001-10-31 10:13:52 +0000 | [diff] [blame] | 159 | Other mac-specific goodies can be found in :Mac:Tools, of which the |
| 160 | IDE sources and a CGI framework deserve special mention. |
Jack Jansen | 8a6cdcc | 2000-09-10 12:02:28 +0000 | [diff] [blame] | 161 | |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 162 | The 'img' group of modules, which handles I/O of many different image |
Jack Jansen | d0ddb66 | 1998-04-27 15:14:36 +0000 | [diff] [blame] | 163 | formats is included, but without documentation. You can find docs at |
| 164 | ftp://ftp.cwi.nl/pub/jack/python/img (or somewhere around there). |
| 165 | |
| 166 | Finally there is a Mac:Contrib folder which contains some contributed |
Jack Jansen | 12a37b7 | 2000-05-06 23:01:07 +0000 | [diff] [blame] | 167 | software. |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 168 | |
| 169 | Upgrading from older Python releases |
| 170 | ------------------------------------ |
| 171 | |
Jack Jansen | 1a29ed7 | 2001-10-31 10:13:52 +0000 | [diff] [blame] | 172 | Python releases are independent of each other, with separate |
| 173 | Preferences files, shared library names, etc. The good news is that |
| 174 | this means you can keep your older version around if you are unsure |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 175 | whether to upgrade. The bad news is that your old preference settings |
| 176 | are lost and you have to set them again. |
| 177 | |
Jack Jansen | 601b2fd | 2002-04-23 19:50:53 +0000 | [diff] [blame] | 178 | After you are satisfied that 2.2.1 works as expected you can trash |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 179 | anything in the system folder that has "python" in the name and not |
Jack Jansen | 601b2fd | 2002-04-23 19:50:53 +0000 | [diff] [blame] | 180 | "2.2.1". |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 181 | |
Jack Jansen | 1a29ed7 | 2001-10-31 10:13:52 +0000 | [diff] [blame] | 182 | The ConfigurePython... applets will try to detect incompatible |
| 183 | preferences files and offer to remove them. This means that re-running |
| 184 | ConfigurePython after a second install of the same MacPython version |
| 185 | (or after moving the Python folder) should fix things up correctly. |
Jack Jansen | 2b73fe9 | 2001-03-27 21:38:55 +0000 | [diff] [blame] | 186 | |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 187 | The installer |
| 188 | ------------- |
| 189 | |
Jack Jansen | 12a37b7 | 2000-05-06 23:01:07 +0000 | [diff] [blame] | 190 | The installer for this product was created using Installer VISE |
| 191 | from MindVision Software. For more information on Installer VISE, |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 192 | contact: |
| 193 | MindVision Software |
| 194 | 7201 North 7th Street |
| 195 | Lincoln, NE 68521-8913 |
| 196 | Voice: 402-477-3269 |
| 197 | Fax: 402-477-1395 |
| 198 | Internet: mindvision@mindvision.com |
| 199 | http://www.mindvision.com |
| 200 | |
Just van Rossum | d16199a | 2001-12-13 12:58:09 +0000 | [diff] [blame] | 201 | Just van Rossum <just@letterror.com> created the initial version of the |
Jack Jansen | 12a37b7 | 2000-05-06 23:01:07 +0000 | [diff] [blame] | 202 | installer (with Installer Vise Lite), and Jack worked from there. |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 203 | |
Jack Jansen | 01ae9eb | 2000-04-22 22:57:25 +0000 | [diff] [blame] | 204 | Thanks! |
| 205 | ------- |
| 206 | |
Jack Jansen | 965226b | 2000-09-14 20:58:24 +0000 | [diff] [blame] | 207 | Thanks go to the whole Python community with Guido in the lead, of |
| 208 | course. Mac-specific thanks go to the pythonmac-sig, Just van Rossum, |
| 209 | Corran Webster, Tony Ingraldi, Erik van Blokland, Bill Bedford, Chris |
| 210 | Stern, Gordon Worley, Oliver Steele, M. Papillon, Steven Majewski, David |
Jack Jansen | 538bd13 | 2000-10-19 21:58:27 +0000 | [diff] [blame] | 211 | Goodger, Chris Barker, Luc Lefebvre, Tattoo Mabonzo K., Russell Finn, |
Jack Jansen | f7e5714 | 2001-09-08 21:38:26 +0000 | [diff] [blame] | 212 | Tom Bridgman, Russel Owen, Pascal Oberndoerfer, Dean Draayer, |
Jack Jansen | 6bc62c4 | 2001-12-20 20:41:45 +0000 | [diff] [blame] | 213 | Alexandre Parenteau, Donovan Preston, Daniel Brotsky, Jason Harper, |
Jack Jansen | ca80002 | 2002-04-22 13:56:25 +0000 | [diff] [blame] | 214 | Nitin Ganatra, Jacob Kaplan-Moss, Michael J. Barber, Tom Loredo, |
| 215 | Christopher Smith, |
Jack Jansen | de1d495 | 2001-08-27 15:30:48 +0000 | [diff] [blame] | 216 | and all the other people who provided feedback, code or both! |
Jack Jansen | 01ae9eb | 2000-04-22 22:57:25 +0000 | [diff] [blame] | 217 | |
Jack Jansen | 1a29ed7 | 2001-10-31 10:13:52 +0000 | [diff] [blame] | 218 | MacPython includes waste, a TextEdit replacement which is (c) 1998 |
| 219 | Marco Piovanelli. |
Jack Jansen | de51909 | 2000-10-12 21:21:43 +0000 | [diff] [blame] | 220 | |
Jack Jansen | 1a29ed7 | 2001-10-31 10:13:52 +0000 | [diff] [blame] | 221 | A special mention is deserved by Matthias Neeracher, who has written |
| 222 | the brilliant unix-compatible GUSI I/O library, without which |
| 223 | MacPython would not have sockets or select, and to Alexandre |
| 224 | Parenteau, who has ported this library to Carbon. |
Jack Jansen | 9080e9b | 2001-01-23 21:03:52 +0000 | [diff] [blame] | 225 | |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 226 | Feedback |
| 227 | -------- |
| 228 | |
| 229 | Send bug reports, suggestions, contributions and fanmail to |
Jack Jansen | ecbc1cc | 1998-01-06 12:13:16 +0000 | [diff] [blame] | 230 | <jack@cwi.nl>. However, a better way to discuss MacPython is to join the |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 231 | <pythonmac-sig@python.org> mailing list, which is explicitly meant for |
| 232 | this purpose. |
| 233 | |
Jack Jansen | b25ec91 | 2001-03-05 15:44:55 +0000 | [diff] [blame] | 234 | |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 235 | Jack Jansen |
Jack Jansen | b952651 | 2001-12-27 23:01:18 +0000 | [diff] [blame] | 236 | CWI |
| 237 | Kruislaan 413 |
| 238 | 1098 SJ Amsterdam |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 239 | the Netherlands |
| 240 | |
| 241 | <jack@cwi.nl>, http://www.cwi.nl/~jack |