Jack Jansen | 3e82872 | 2003-01-08 16:27:44 +0000 | [diff] [blame] | 1 | How to install MacPython-OS9 2.3a1 on your Macintosh |
| 2 | ---------------------------------------------------- |
Jack Jansen | 2f9a9e3 | 2001-02-17 22:03:42 +0000 | [diff] [blame] | 3 | |
Jack Jansen | 3e82872 | 2003-01-08 16:27:44 +0000 | [diff] [blame] | 4 | This is a MacPython that can run on Mac OS 8.6 with CarbonLib |
| 5 | installed, Mac OS 9 and Mac OS X. It is the direct successor of MacPython 2.2. |
Jack Jansen | 2f9a9e3 | 2001-02-17 22:03:42 +0000 | [diff] [blame] | 6 | |
Jack Jansen | 3e82872 | 2003-01-08 16:27:44 +0000 | [diff] [blame] | 7 | For Mac OS X users: you are probably better off with the normal unix distribution |
| 8 | of Python. That version also runs from the commandline, and if you do a framework |
| 9 | build it will contain all the functionality of this version too. A prebuilt |
| 10 | version will be available starting with the beta distributions. |
Jack Jansen | 2f9a9e3 | 2001-02-17 22:03:42 +0000 | [diff] [blame] | 11 | |
Jack Jansen | 3e82872 | 2003-01-08 16:27:44 +0000 | [diff] [blame] | 12 | If you are upgrading from a previous MacPython you should read :Misc:NEWS, |
| 13 | which lists the new features of this Python release. As of this release |
| 14 | the Mac-specific release notes have been moved to the "Mac" section of |
| 15 | the general NEWS file. |
| 16 | |
| 17 | Two changes since 2.2 deserve special mention: |
| 18 | - Most Mac-specific modules have moved to :Lib:plat-mac. :Mac:Lib now contains |
| 19 | only modules that are not shared with MacPython-OSX 2.3. |
| 20 | - macfs is now a pure Python wrapper module around various modules in the |
| 21 | Carbon package. For 2.3a1 only this wrapping is incomplete: fsspec.SetDates() |
| 22 | does not work yet. If you encounter any other problems please report them. |
Jack Jansen | 8ef786e | 2001-03-15 14:27:09 +0000 | [diff] [blame] | 23 | |
Jack Jansen | 2f9a9e3 | 2001-02-17 22:03:42 +0000 | [diff] [blame] | 24 | ------ |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 25 | |
| 26 | If this is your first encounter with Python: you definitely need the |
| 27 | common user documentation (common to all platforms). You can find this |
Jack Jansen | 538bd13 | 2000-10-19 21:58:27 +0000 | [diff] [blame] | 28 | (in various forms) on www.pythonlabs.com, www.python.org and |
| 29 | ftp.python.org. Through there, or via |
| 30 | http://www.cwi.nl/~jack/macpython.html you can also find the most recent |
| 31 | MacPython distribution. |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 32 | |
| 33 | Mac-specific documentation is included in this distribution in folder |
| 34 | Mac:Demo. The documentation is sparse, but it will have to serve for |
| 35 | now. The documentation is in HTML format, start with index.html. |
| 36 | |
Jack Jansen | 3e82872 | 2003-01-08 16:27:44 +0000 | [diff] [blame] | 37 | If you want a MacPython that runs on systems without Carbon support (8.1 |
| 38 | up to 8.6 without CarbonLib) you should get MacPython 2.2.2. |
Jack Jansen | ecbc1cc | 1998-01-06 12:13:16 +0000 | [diff] [blame] | 39 | |
Jack Jansen | b952651 | 2001-12-27 23:01:18 +0000 | [diff] [blame] | 40 | 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] | 41 | |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 42 | What to install |
| 43 | --------------- |
| 44 | |
Jack Jansen | 12a37b7 | 2000-05-06 23:01:07 +0000 | [diff] [blame] | 45 | The optional parts in this distribution are |
Jack Jansen | 3e82872 | 2003-01-08 16:27:44 +0000 | [diff] [blame] | 46 | - PIL: the Python image manipulation package (allows you to read, write |
| 47 | and display images and do lots of operations on them). Tkinter is no |
| 48 | longer supported, a working Carbon version is Tk is not available. |
Jack Jansen | 12a37b7 | 2000-05-06 23:01:07 +0000 | [diff] [blame] | 49 | - img: another imaging package. Has more file format support and is faster |
| 50 | than imaging, but has only limited operations on images. There is a bridge |
| 51 | between the packages. |
| 52 | - Numeric: the LLNL Numeric Python extension. All sorts of nifty operations |
Jack Jansen | 3e82872 | 2003-01-08 16:27:44 +0000 | [diff] [blame] | 53 | on matrices and such. This is version 22. |
Jack Jansen | 1a29ed7 | 2001-10-31 10:13:52 +0000 | [diff] [blame] | 54 | - Developers kit: all header files and some tools and sample projects |
| 55 | to get you started on writing Python extensions if you have CodeWarrior. |
Jack Jansen | 12a37b7 | 2000-05-06 23:01:07 +0000 | [diff] [blame] | 56 | All these except the DevKit are installed with Easy Install. |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 57 | |
Jack Jansen | 3e82872 | 2003-01-08 16:27:44 +0000 | [diff] [blame] | 58 | After the installer finishes it automatically launches the |
| 59 | ConfigurePython applet, to finish configuration of your Python. |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 60 | |
Jack Jansen | 1a29ed7 | 2001-10-31 10:13:52 +0000 | [diff] [blame] | 61 | Moving your Python installation after installing is generally not a |
| 62 | good idea. If you have to do this anyway you should remove your |
| 63 | preference file, run ConfigurePython and remove all .pyc |
| 64 | files. (there's a script zappyc.py that does the latter). |
Jack Jansen | 2e42bdd | 2000-11-14 20:37:37 +0000 | [diff] [blame] | 65 | |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 66 | If you don't have enough memory: the sizes choosen are somewhat |
Jack Jansen | 1a29ed7 | 2001-10-31 10:13:52 +0000 | [diff] [blame] | 67 | arbitrary, and they are as high as they are so that test.autotest runs |
| 68 | with fewer problems. An average Python program can make do with much |
| 69 | less memory. Try lowering the application sizes in the finder "get |
| 70 | info" window, and seeing whether the resulting python is still usable. |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 71 | |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 72 | After installing |
| 73 | ---------------- |
| 74 | |
Jack Jansen | 8a6cdcc | 2000-09-10 12:02:28 +0000 | [diff] [blame] | 75 | It is probably a good idea to run the automatic tests. Start |
Jack Jansen | f7e5714 | 2001-09-08 21:38:26 +0000 | [diff] [blame] | 76 | Python and "import test.regrtest ; test.regrtest.main()". |
Jack Jansen | de51909 | 2000-10-12 21:21:43 +0000 | [diff] [blame] | 77 | |
Jack Jansen | 3e82872 | 2003-01-08 16:27:44 +0000 | [diff] [blame] | 78 | test_httplib fails with an unexpected output error, |
| 79 | this problem is being investigated. |
| 80 | |
| 81 | test_socket fails, this problem is being investigated. |
Jack Jansen | b3be216 | 2001-11-30 14:16:36 +0000 | [diff] [blame] | 82 | |
Jack Jansen | f7e5714 | 2001-09-08 21:38:26 +0000 | [diff] [blame] | 83 | Three tests will fail on MacOS9 with MemoryErrors: |
Jack Jansen | 5d528b7 | 2001-10-23 22:22:09 +0000 | [diff] [blame] | 84 | test_longexp, test_sha and test_zlib (on MacOSX these should pass). |
Jack Jansen | 2b73fe9 | 2001-03-27 21:38:55 +0000 | [diff] [blame] | 85 | |
Jack Jansen | 1a29ed7 | 2001-10-31 10:13:52 +0000 | [diff] [blame] | 86 | If you increase the PythonInterpreter memory partition size they will |
| 87 | pass (but for longexp you have to increase it by an incredible amount, |
| 88 | 400MB is rumoured). It will, however, print some messages about |
| 89 | optional features not supported. You should not worry about these, |
| 90 | they are modules that are supported by Python on other |
| 91 | platforms. Also, if you didn't run compileall before autotesting you |
| 92 | may run out of memory the first time you run the tests. test_socket |
| 93 | may also fail if you have no internet connection. Please also read the |
| 94 | Relnotes file for other minor problems with this distribution. |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 95 | |
Jack Jansen | 1a29ed7 | 2001-10-31 10:13:52 +0000 | [diff] [blame] | 96 | Using Python is most easily done from the IDE, which has a builtin |
| 97 | editor, debugger and other goodies. The alternative is to use |
| 98 | PythonInterpreter, which is the lowlevel interpreter with a |
| 99 | console-window only (similar to Unix Python). |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 100 | |
Jack Jansen | 1a29ed7 | 2001-10-31 10:13:52 +0000 | [diff] [blame] | 101 | If your program uses Tkinter you MUST run it under PythonInterpreter, |
| 102 | Tkinter and IDE are incompatible and your program will fail in strange |
| 103 | ways. |
Jack Jansen | 8a6cdcc | 2000-09-10 12:02:28 +0000 | [diff] [blame] | 104 | |
Jack Jansen | 601b2fd | 2002-04-23 19:50:53 +0000 | [diff] [blame] | 105 | OSX Multiple users note |
| 106 | ----------------------- |
| 107 | |
| 108 | Interaction with Mac OS X multiple users has been tested only very lightly. |
| 109 | If you install as a privileged user everything installs fine. |
| 110 | |
| 111 | If you install as a non-privileged user everything should install in your local |
| 112 | per-user folders. But: as there is no global PythonCore you can only run applets |
| 113 | if they reside in your toplevel Python folder. |
| 114 | |
| 115 | If you install as a privileged user and then try to run |
| 116 | Python as another (non-privileged) user you may encounter a problem with |
| 117 | not having a preference file: the symptom is failing to import all sorts |
| 118 | of standard modules. If you remove your per-user Python preference files |
Jack Jansen | 3e82872 | 2003-01-08 16:27:44 +0000 | [diff] [blame] | 119 | (in ~/Library/Preferences) and then run PythonInterpreter once everything should |
Jack Jansen | 601b2fd | 2002-04-23 19:50:53 +0000 | [diff] [blame] | 120 | be fine. |
| 121 | |
Jack Jansen | 0b72695 | 1997-10-08 15:34:42 +0000 | [diff] [blame] | 122 | Uninstalling |
| 123 | ------------ |
| 124 | |
Jack Jansen | 3e82872 | 2003-01-08 16:27:44 +0000 | [diff] [blame] | 125 | Up to three items are installed in the MacOS 8 or 9 system folder: the interpreter |
| 126 | shared library PythonCore lives in the Extensions |
| 127 | folder and the "Python 2.3a1 Preferences" file in the Python subfolder |
Jack Jansen | 1a29ed7 | 2001-10-31 10:13:52 +0000 | [diff] [blame] | 128 | in the Preferences folder. All the rest of Python lives in the folder |
| 129 | you installed in. |
Jack Jansen | 0b72695 | 1997-10-08 15:34:42 +0000 | [diff] [blame] | 130 | |
Jack Jansen | 3e82872 | 2003-01-08 16:27:44 +0000 | [diff] [blame] | 131 | On OSX the library is installed in /Library/CFMSupport. The ConfigurePython |
Jack Jansen | b952651 | 2001-12-27 23:01:18 +0000 | [diff] [blame] | 132 | applets will complain if you have no right to create the libraries there |
| 133 | (you need Admin privileges). This has one consequence: you will not be able to |
| 134 | run applets unless they reside in the MacPython folder (such as the IDE or |
| 135 | EditPythonPrefs). If you try to run an applet stored elsewhere you will |
| 136 | get a "Cannot locate PythonCore" error message. |
Jack Jansen | c1218bc | 2001-04-25 22:11:24 +0000 | [diff] [blame] | 137 | |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 138 | Things to see |
| 139 | ------------- |
| 140 | |
Jack Jansen | 12a37b7 | 2000-05-06 23:01:07 +0000 | [diff] [blame] | 141 | Start off at Mac:Demo:index.html. Read at least the first few sections. |
| 142 | |
Jack Jansen | 3e82872 | 2003-01-08 16:27:44 +0000 | [diff] [blame] | 143 | There is also a first stab at documentation (plus examples) in the |
| 144 | Mac:Demo folder. The toplevel Demo folder has machine-independent demos. |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 145 | |
Jack Jansen | 1a29ed7 | 2001-10-31 10:13:52 +0000 | [diff] [blame] | 146 | The ":Mac:scripts" folder has some sample scripts. Some are useful, |
| 147 | some are just interesting to look at to see how various things |
| 148 | work. The MkDistr, mkapplet and fullbuild scripts (plus the ones |
| 149 | mentioned above) may help you to understand how to use AppleEvents and |
| 150 | various other toolboxes from python. |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 151 | |
Jack Jansen | 1a29ed7 | 2001-10-31 10:13:52 +0000 | [diff] [blame] | 152 | Other mac-specific goodies can be found in :Mac:Tools, of which the |
| 153 | IDE sources and a CGI framework deserve special mention. |
Jack Jansen | 8a6cdcc | 2000-09-10 12:02:28 +0000 | [diff] [blame] | 154 | |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 155 | 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] | 156 | formats is included, but without documentation. You can find docs at |
| 157 | ftp://ftp.cwi.nl/pub/jack/python/img (or somewhere around there). |
| 158 | |
| 159 | Finally there is a Mac:Contrib folder which contains some contributed |
Jack Jansen | 12a37b7 | 2000-05-06 23:01:07 +0000 | [diff] [blame] | 160 | software. |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 161 | |
| 162 | Upgrading from older Python releases |
| 163 | ------------------------------------ |
| 164 | |
Jack Jansen | 1a29ed7 | 2001-10-31 10:13:52 +0000 | [diff] [blame] | 165 | Python releases are independent of each other, with separate |
| 166 | Preferences files, shared library names, etc. The good news is that |
| 167 | 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] | 168 | whether to upgrade. The bad news is that your old preference settings |
| 169 | are lost and you have to set them again. |
| 170 | |
Jack Jansen | 3e82872 | 2003-01-08 16:27:44 +0000 | [diff] [blame] | 171 | After you are satisfied that 2.3a1 works as expected you can trash |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 172 | anything in the system folder that has "python" in the name and not |
Jack Jansen | 3e82872 | 2003-01-08 16:27:44 +0000 | [diff] [blame] | 173 | "2.3a1". |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 174 | |
Jack Jansen | 3e82872 | 2003-01-08 16:27:44 +0000 | [diff] [blame] | 175 | The ConfigurePython applet will try to detect incompatible |
Jack Jansen | 1a29ed7 | 2001-10-31 10:13:52 +0000 | [diff] [blame] | 176 | preferences files and offer to remove them. This means that re-running |
| 177 | ConfigurePython after a second install of the same MacPython version |
| 178 | (or after moving the Python folder) should fix things up correctly. |
Jack Jansen | 2b73fe9 | 2001-03-27 21:38:55 +0000 | [diff] [blame] | 179 | |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 180 | The installer |
| 181 | ------------- |
| 182 | |
Jack Jansen | 12a37b7 | 2000-05-06 23:01:07 +0000 | [diff] [blame] | 183 | The installer for this product was created using Installer VISE |
| 184 | from MindVision Software. For more information on Installer VISE, |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 185 | contact: |
| 186 | MindVision Software |
| 187 | 7201 North 7th Street |
| 188 | Lincoln, NE 68521-8913 |
| 189 | Voice: 402-477-3269 |
| 190 | Fax: 402-477-1395 |
| 191 | Internet: mindvision@mindvision.com |
| 192 | http://www.mindvision.com |
| 193 | |
Just van Rossum | d16199a | 2001-12-13 12:58:09 +0000 | [diff] [blame] | 194 | Just van Rossum <just@letterror.com> created the initial version of the |
Jack Jansen | 12a37b7 | 2000-05-06 23:01:07 +0000 | [diff] [blame] | 195 | installer (with Installer Vise Lite), and Jack worked from there. |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 196 | |
Jack Jansen | 01ae9eb | 2000-04-22 22:57:25 +0000 | [diff] [blame] | 197 | Thanks! |
| 198 | ------- |
| 199 | |
Jack Jansen | 0281512 | 2002-08-19 13:17:39 +0000 | [diff] [blame] | 200 | As of Python 2.3 the MacPython thanks list has been merged into the |
| 201 | general acknowledgements, see :Misc:ACKS. |
Jack Jansen | 01ae9eb | 2000-04-22 22:57:25 +0000 | [diff] [blame] | 202 | |
Jack Jansen | 1a29ed7 | 2001-10-31 10:13:52 +0000 | [diff] [blame] | 203 | MacPython includes waste, a TextEdit replacement which is (c) 1998 |
| 204 | Marco Piovanelli. |
Jack Jansen | de51909 | 2000-10-12 21:21:43 +0000 | [diff] [blame] | 205 | |
Jack Jansen | 1a29ed7 | 2001-10-31 10:13:52 +0000 | [diff] [blame] | 206 | A special mention is deserved by Matthias Neeracher, who has written |
| 207 | the brilliant unix-compatible GUSI I/O library, without which |
| 208 | MacPython would not have sockets or select, and to Alexandre |
| 209 | Parenteau, who has ported this library to Carbon. |
Jack Jansen | 9080e9b | 2001-01-23 21:03:52 +0000 | [diff] [blame] | 210 | |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 211 | Feedback |
| 212 | -------- |
| 213 | |
| 214 | Send bug reports, suggestions, contributions and fanmail to |
Jack Jansen | ecbc1cc | 1998-01-06 12:13:16 +0000 | [diff] [blame] | 215 | <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] | 216 | <pythonmac-sig@python.org> mailing list, which is explicitly meant for |
| 217 | this purpose. |
| 218 | |
Jack Jansen | b25ec91 | 2001-03-05 15:44:55 +0000 | [diff] [blame] | 219 | |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 220 | Jack Jansen |
Jack Jansen | b952651 | 2001-12-27 23:01:18 +0000 | [diff] [blame] | 221 | CWI |
| 222 | Kruislaan 413 |
| 223 | 1098 SJ Amsterdam |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 224 | the Netherlands |
| 225 | |
| 226 | <jack@cwi.nl>, http://www.cwi.nl/~jack |