Jack Jansen | c1218bc | 2001-04-25 22:11:24 +0000 | [diff] [blame^] | 1 | How to install Python 2.1 on your Macintosh |
| 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 |
| 6 | use the Carbon version or not. This is also the first MacPython distribution |
| 7 | to be packaged as an active installer, which only downloads the parts you actually |
| 8 | need. Let me hear about problems in these areas. |
Jack Jansen | 2f9a9e3 | 2001-02-17 22:03:42 +0000 | [diff] [blame] | 9 | |
| 10 | You should definitely read the Relnotes file too. |
| 11 | |
Jack Jansen | c1218bc | 2001-04-25 22:11:24 +0000 | [diff] [blame^] | 12 | 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] | 13 | your machine. This is a general problem with Vise active installers, MindVision |
| 14 | are working on it. |
Jack Jansen | 8ef786e | 2001-03-15 14:27:09 +0000 | [diff] [blame] | 15 | |
Jack Jansen | c1218bc | 2001-04-25 22:11:24 +0000 | [diff] [blame^] | 16 | If you installed a 2.1 beta on MacOSX you MUST read the uninstall section below. |
| 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 | d0ddb66 | 1998-04-27 15:14:36 +0000 | [diff] [blame] | 31 | Caveats |
| 32 | ------- |
Jack Jansen | 2f9a9e3 | 2001-02-17 22:03:42 +0000 | [diff] [blame] | 33 | Aside from the general new Python 2.1 features compared to 2.0 the main |
| 34 | feature of this release is Carbon support. |
Jack Jansen | ffd61a6 | 2000-04-09 18:37:50 +0000 | [diff] [blame] | 35 | |
Jack Jansen | cbe7b1c | 2001-03-06 22:42:12 +0000 | [diff] [blame] | 36 | This installer installs MacPython for classic PPC MacOS, MacPython for Carbon |
| 37 | (OS X, OS 9 or OS8 with CarbonLib installed) or both, depending on your |
| 38 | configuration. By selecting custom install you can bypass these tests and |
| 39 | install what you want. |
Jack Jansen | ecbc1cc | 1998-01-06 12:13:16 +0000 | [diff] [blame] | 40 | |
Jack Jansen | 2b73fe9 | 2001-03-27 21:38:55 +0000 | [diff] [blame] | 41 | If you want 68k support you will have to stay with MacPython 1.5.2. |
Jack Jansen | 965226b | 2000-09-14 20:58:24 +0000 | [diff] [blame] | 42 | |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 43 | What to install |
| 44 | --------------- |
| 45 | |
Jack Jansen | 12a37b7 | 2000-05-06 23:01:07 +0000 | [diff] [blame] | 46 | The optional parts in this distribution are |
| 47 | - TK+PIL: Tkinter and support modules, plus Imaging, the Python image manipulation |
| 48 | package (allows you to read, write and display images and do lots of operations on them). |
Jack Jansen | cbe7b1c | 2001-03-06 22:42:12 +0000 | [diff] [blame] | 49 | For Carbon MacPython you only get PIL: there is no Tcl/Tk for Carbon yet. |
Jack Jansen | 2b73fe9 | 2001-03-27 21:38:55 +0000 | [diff] [blame] | 50 | This is the reason Classic MacPython is also installed on MacOSX: it allows you |
| 51 | to run Tkinter applications, albeit in the MacOS9 box. |
Jack Jansen | 12a37b7 | 2000-05-06 23:01:07 +0000 | [diff] [blame] | 52 | - img: another imaging package. Has more file format support and is faster |
| 53 | than imaging, but has only limited operations on images. There is a bridge |
| 54 | between the packages. |
| 55 | - Numeric: the LLNL Numeric Python extension. All sorts of nifty operations |
Jack Jansen | 8a6cdcc | 2000-09-10 12:02:28 +0000 | [diff] [blame] | 56 | on matrices and such. This is the most recent version from the sourceforge archive. |
Jack Jansen | cbe7b1c | 2001-03-06 22:42:12 +0000 | [diff] [blame] | 57 | Numeric has moved from Extensions to :Lib:site-python, by the way, see the release |
| 58 | notes. |
Jack Jansen | 12a37b7 | 2000-05-06 23:01:07 +0000 | [diff] [blame] | 59 | - Developers kit: all header files and some tools and sample projects to get you started on |
| 60 | writing Python extensions if you have CodeWarrior. |
| 61 | All these except the DevKit are installed with Easy Install. |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 62 | |
Jack Jansen | cbe7b1c | 2001-03-06 22:42:12 +0000 | [diff] [blame] | 63 | After the installer finishes it automatically launches the appropriate |
Jack Jansen | 2b73fe9 | 2001-03-27 21:38:55 +0000 | [diff] [blame] | 64 | ConfigurePython applet, to finish configuration of your Python. If you run MacOS9 or later |
Jack Jansen | cbe7b1c | 2001-03-06 22:42:12 +0000 | [diff] [blame] | 65 | (or 8 with CarbonLib installed) you can switch back and forth between the classic and |
| 66 | Carbon versions of Python by running either ConfigurePythonClassic or ConfigurePythonCarbon. |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 67 | |
Jack Jansen | 2e42bdd | 2000-11-14 20:37:37 +0000 | [diff] [blame] | 68 | Moving your Python installation after installing is generally not a good idea. |
| 69 | If you have to do this anyway you should remove your preference file, run |
Jack Jansen | 2f9a9e3 | 2001-02-17 22:03:42 +0000 | [diff] [blame] | 70 | ConfigurePython and remove all .pyc files. (there's a script zappyc.py that does |
| 71 | the latter). |
Jack Jansen | 2e42bdd | 2000-11-14 20:37:37 +0000 | [diff] [blame] | 72 | |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 73 | If you don't have enough memory: the sizes choosen are somewhat |
Jack Jansen | 9080e9b | 2001-01-23 21:03:52 +0000 | [diff] [blame] | 74 | arbitrary, and they are as high as they are so that test.autotest runs with fewer |
| 75 | problems. An average Python program can make do with much less memory. |
| 76 | Try lowering the application sizes in the finder "get info" |
| 77 | window, and seeing whether the resulting python is still usable. |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 78 | |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 79 | After installing |
| 80 | ---------------- |
| 81 | |
Jack Jansen | 8a6cdcc | 2000-09-10 12:02:28 +0000 | [diff] [blame] | 82 | It is probably a good idea to run the automatic tests. Start |
Jack Jansen | de51909 | 2000-10-12 21:21:43 +0000 | [diff] [blame] | 83 | Python and "import test.autotest". |
| 84 | |
Jack Jansen | 2b73fe9 | 2001-03-27 21:38:55 +0000 | [diff] [blame] | 85 | Two tests will fail on MacOS9, both with MemoryErrors: |
Jack Jansen | 2f9a9e3 | 2001-02-17 22:03:42 +0000 | [diff] [blame] | 86 | test_longexp and test_zlib (on MacOSX nothing should fail). |
Jack Jansen | 2b73fe9 | 2001-03-27 21:38:55 +0000 | [diff] [blame] | 87 | |
Jack Jansen | 2f9a9e3 | 2001-02-17 22:03:42 +0000 | [diff] [blame] | 88 | If you increase the PythonInterpreter memory |
Jack Jansen | 2b73fe9 | 2001-03-27 21:38:55 +0000 | [diff] [blame] | 89 | partition size they will pass (but for longexp you have to increase it by an |
Jack Jansen | cbe7b1c | 2001-03-06 22:42:12 +0000 | [diff] [blame] | 90 | incredible amount). It will, however, print some messages |
Jack Jansen | 2e42bdd | 2000-11-14 20:37:37 +0000 | [diff] [blame] | 91 | about optional features not supported. You should not worry about these, |
| 92 | they are modules that are supported by Python on other platforms. Also, |
| 93 | if you didn't run compileall before autotesting you may run out of |
| 94 | memory the first time you run the tests. test_socket may also fail if |
| 95 | you have no internet connection. Please also read the Relnotes file for |
| 96 | other minor problems with this distribution. |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 97 | |
Jack Jansen | 12a37b7 | 2000-05-06 23:01:07 +0000 | [diff] [blame] | 98 | Using Python is most easily done from the IDE, which has a builtin editor, |
| 99 | debugger and other goodies. The alternative is to use PythonInterpreter, |
| 100 | which is the lowlevel interpreter with a console-window only (similar to Unix |
| 101 | Python). |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 102 | |
Jack Jansen | 8a6cdcc | 2000-09-10 12:02:28 +0000 | [diff] [blame] | 103 | If your program uses Tkinter you MUST run it under PythonInterpreter, Tkinter |
| 104 | and IDE are incompatible and your program will fail in strange ways. |
| 105 | |
Jack Jansen | 0b72695 | 1997-10-08 15:34:42 +0000 | [diff] [blame] | 106 | Uninstalling |
| 107 | ------------ |
| 108 | |
| 109 | Two items are installed in the system folder: the interpreter shared |
Jack Jansen | 2f9a9e3 | 2001-02-17 22:03:42 +0000 | [diff] [blame] | 110 | libraries PythonCore and PythonCoreCarbon lives in the Extensions folder and the |
Jack Jansen | c1218bc | 2001-04-25 22:11:24 +0000 | [diff] [blame^] | 111 | "Python 2.1 Preferences" file in the Python subfolder in the |
Jack Jansen | 8a6cdcc | 2000-09-10 12:02:28 +0000 | [diff] [blame] | 112 | Preferences folder. All the rest of Python lives in the folder you |
| 113 | installed in. |
Jack Jansen | 0b72695 | 1997-10-08 15:34:42 +0000 | [diff] [blame] | 114 | |
Jack Jansen | c1218bc | 2001-04-25 22:11:24 +0000 | [diff] [blame^] | 115 | On OSX the libraries are installed in /Library/CFMSupport. There is a nasty bug |
| 116 | in OSX that is triggered by Python: if any orphaned aliases are left in |
| 117 | /Library/CFMSupport your machine will start to behave very badly. 2.1 |
| 118 | beta installers triggered this problem if you simply threw away your Python folder, |
| 119 | so if you installed a 2.1beta you should clean out the aliases in /Library/CFMSupport |
| 120 | too. This final 2.1 installer always copies the shared libraries on OSX, so it does |
| 121 | not have the problem anymore. |
| 122 | |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 123 | Things to see |
| 124 | ------------- |
| 125 | |
Jack Jansen | 12a37b7 | 2000-05-06 23:01:07 +0000 | [diff] [blame] | 126 | Start off at Mac:Demo:index.html. Read at least the first few sections. |
| 127 | |
Jack Jansen | 8a6cdcc | 2000-09-10 12:02:28 +0000 | [diff] [blame] | 128 | There are also some interesting files in the "Relnotes" folder that may |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 129 | contain useful information. There is also a first stab at documentation |
| 130 | (plus examples) in the Mac:Demo folder. The toplevel Demo folder has |
Jack Jansen | 12a37b7 | 2000-05-06 23:01:07 +0000 | [diff] [blame] | 131 | machine-independent demos. |
| 132 | The Mac:Lib:test folder also has some programs that show simple |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 133 | capabilities of various modules. |
| 134 | |
Jack Jansen | 8a6cdcc | 2000-09-10 12:02:28 +0000 | [diff] [blame] | 135 | The ":Mac:scripts" folder has some sample scripts. Some are useful, some are |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 136 | just interesting to look at to see how various things work. The MkDistr, |
| 137 | mkapplet and fullbuild scripts (plus the ones mentioned above) may help |
| 138 | you to understand how to use AppleEvents and various other toolboxes |
| 139 | from python. |
| 140 | |
Jack Jansen | 8a6cdcc | 2000-09-10 12:02:28 +0000 | [diff] [blame] | 141 | Other mac-specific goodies can be found in :Mac:Tools, of which the IDE sources |
| 142 | and a CGI framework deserve special mention. |
| 143 | |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 144 | 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] | 145 | formats is included, but without documentation. You can find docs at |
| 146 | ftp://ftp.cwi.nl/pub/jack/python/img (or somewhere around there). |
| 147 | |
| 148 | Finally there is a Mac:Contrib folder which contains some contributed |
Jack Jansen | 12a37b7 | 2000-05-06 23:01:07 +0000 | [diff] [blame] | 149 | software. |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 150 | |
| 151 | Upgrading from older Python releases |
| 152 | ------------------------------------ |
| 153 | |
Jack Jansen | 2f9a9e3 | 2001-02-17 22:03:42 +0000 | [diff] [blame] | 154 | Python releases are independent of each other, with |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 155 | separate Preferences files, shared library names, etc. The good news is |
| 156 | that this means you can keep your older version around if you are unsure |
| 157 | whether to upgrade. The bad news is that your old preference settings |
| 158 | are lost and you have to set them again. |
| 159 | |
Jack Jansen | 2f9a9e3 | 2001-02-17 22:03:42 +0000 | [diff] [blame] | 160 | After you are satisfied that 2.1 works as expected you can trash |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 161 | anything in the system folder that has "python" in the name and not |
Jack Jansen | 2f9a9e3 | 2001-02-17 22:03:42 +0000 | [diff] [blame] | 162 | "2.1". |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 163 | |
Jack Jansen | 2b73fe9 | 2001-03-27 21:38:55 +0000 | [diff] [blame] | 164 | As of 2.1 the ConfigurePython applets will try to detect incompatible preferences |
| 165 | files and offer to remove them. This means that re-running ConfigurePython after |
| 166 | a second install of the same MacPython version (or after moving the Python folder) |
| 167 | should fix things up correctly. |
| 168 | |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 169 | The installer |
| 170 | ------------- |
| 171 | |
Jack Jansen | 12a37b7 | 2000-05-06 23:01:07 +0000 | [diff] [blame] | 172 | The installer for this product was created using Installer VISE |
| 173 | from MindVision Software. For more information on Installer VISE, |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 174 | contact: |
| 175 | MindVision Software |
| 176 | 7201 North 7th Street |
| 177 | Lincoln, NE 68521-8913 |
| 178 | Voice: 402-477-3269 |
| 179 | Fax: 402-477-1395 |
| 180 | Internet: mindvision@mindvision.com |
| 181 | http://www.mindvision.com |
| 182 | |
Jack Jansen | 12a37b7 | 2000-05-06 23:01:07 +0000 | [diff] [blame] | 183 | Just van Rossum <just@letterror.nl> created the initial version of the |
| 184 | installer (with Installer Vise Lite), and Jack worked from there. |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 185 | |
Jack Jansen | 01ae9eb | 2000-04-22 22:57:25 +0000 | [diff] [blame] | 186 | Thanks! |
| 187 | ------- |
| 188 | |
Jack Jansen | 965226b | 2000-09-14 20:58:24 +0000 | [diff] [blame] | 189 | Thanks go to the whole Python community with Guido in the lead, of |
| 190 | course. Mac-specific thanks go to the pythonmac-sig, Just van Rossum, |
| 191 | Corran Webster, Tony Ingraldi, Erik van Blokland, Bill Bedford, Chris |
| 192 | Stern, Gordon Worley, Oliver Steele, M. Papillon, Steven Majewski, David |
Jack Jansen | 538bd13 | 2000-10-19 21:58:27 +0000 | [diff] [blame] | 193 | Goodger, Chris Barker, Luc Lefebvre, Tattoo Mabonzo K., Russell Finn, |
Jack Jansen | 8ef786e | 2001-03-15 14:27:09 +0000 | [diff] [blame] | 194 | Tom Bridgman Russel Owen and all the other people who provided feedback, |
| 195 | code or both! |
Jack Jansen | 01ae9eb | 2000-04-22 22:57:25 +0000 | [diff] [blame] | 196 | |
Jack Jansen | de51909 | 2000-10-12 21:21:43 +0000 | [diff] [blame] | 197 | MacPython includes waste, a TextEdit replacement which is (c) 1998 Marco Piovanelli. |
| 198 | |
Jack Jansen | 9080e9b | 2001-01-23 21:03:52 +0000 | [diff] [blame] | 199 | A special mention is deserved by Matthias Neeracher, who has written the brilliant |
| 200 | unix-compatible GUSI I/O library, without which MacPython would not have sockets |
| 201 | or select, and to Alexandre Parenteau, who has ported this library to Carbon. |
| 202 | |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 203 | Feedback |
| 204 | -------- |
| 205 | |
| 206 | Send bug reports, suggestions, contributions and fanmail to |
Jack Jansen | ecbc1cc | 1998-01-06 12:13:16 +0000 | [diff] [blame] | 207 | <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] | 208 | <pythonmac-sig@python.org> mailing list, which is explicitly meant for |
| 209 | this purpose. |
| 210 | |
Jack Jansen | b25ec91 | 2001-03-05 15:44:55 +0000 | [diff] [blame] | 211 | |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 212 | Jack Jansen |
Jack Jansen | 12a37b7 | 2000-05-06 23:01:07 +0000 | [diff] [blame] | 213 | Oratrix Development BV |
| 214 | Valeriusplein 30 |
| 215 | Amsterdam |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 216 | the Netherlands |
| 217 | |
| 218 | <jack@cwi.nl>, http://www.cwi.nl/~jack |