Jack Jansen | 5bb97e6 | 2003-02-21 22:33:55 +0000 | [diff] [blame] | 1 | How to install MacPython-OS9 2.3a2 on your Macintosh |
Jack Jansen | 3e82872 | 2003-01-08 16:27:44 +0000 | [diff] [blame] | 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 |
Jack Jansen | 5bb97e6 | 2003-02-21 22:33:55 +0000 | [diff] [blame] | 21 | Carbon package. For 2.3a2 only this wrapping is incomplete: fsspec.SetDates() |
Jack Jansen | 3e82872 | 2003-01-08 16:27:44 +0000 | [diff] [blame] | 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 | 5bb97e6 | 2003-02-21 22:33:55 +0000 | [diff] [blame] | 78 | test_socket and test_logging fail, this problem is being investigated. |
Jack Jansen | 3e82872 | 2003-01-08 16:27:44 +0000 | [diff] [blame] | 79 | |
Jack Jansen | 5bb97e6 | 2003-02-21 22:33:55 +0000 | [diff] [blame] | 80 | test_tarfile fails, this problem is being investigated. |
Jack Jansen | b3be216 | 2001-11-30 14:16:36 +0000 | [diff] [blame] | 81 | |
Jack Jansen | f7e5714 | 2001-09-08 21:38:26 +0000 | [diff] [blame] | 82 | Three tests will fail on MacOS9 with MemoryErrors: |
Jack Jansen | 5d528b7 | 2001-10-23 22:22:09 +0000 | [diff] [blame] | 83 | test_longexp, test_sha and test_zlib (on MacOSX these should pass). |
Jack Jansen | 2b73fe9 | 2001-03-27 21:38:55 +0000 | [diff] [blame] | 84 | |
Jack Jansen | 1a29ed7 | 2001-10-31 10:13:52 +0000 | [diff] [blame] | 85 | If you increase the PythonInterpreter memory partition size they will |
| 86 | pass (but for longexp you have to increase it by an incredible amount, |
| 87 | 400MB is rumoured). It will, however, print some messages about |
| 88 | optional features not supported. You should not worry about these, |
| 89 | they are modules that are supported by Python on other |
| 90 | platforms. Also, if you didn't run compileall before autotesting you |
| 91 | may run out of memory the first time you run the tests. test_socket |
| 92 | may also fail if you have no internet connection. Please also read the |
| 93 | Relnotes file for other minor problems with this distribution. |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 94 | |
Jack Jansen | 1a29ed7 | 2001-10-31 10:13:52 +0000 | [diff] [blame] | 95 | Using Python is most easily done from the IDE, which has a builtin |
| 96 | editor, debugger and other goodies. The alternative is to use |
| 97 | PythonInterpreter, which is the lowlevel interpreter with a |
| 98 | console-window only (similar to Unix Python). |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 99 | |
Jack Jansen | 1a29ed7 | 2001-10-31 10:13:52 +0000 | [diff] [blame] | 100 | If your program uses Tkinter you MUST run it under PythonInterpreter, |
| 101 | Tkinter and IDE are incompatible and your program will fail in strange |
| 102 | ways. |
Jack Jansen | 8a6cdcc | 2000-09-10 12:02:28 +0000 | [diff] [blame] | 103 | |
Jack Jansen | 601b2fd | 2002-04-23 19:50:53 +0000 | [diff] [blame] | 104 | OSX Multiple users note |
| 105 | ----------------------- |
| 106 | |
| 107 | Interaction with Mac OS X multiple users has been tested only very lightly. |
| 108 | If you install as a privileged user everything installs fine. |
| 109 | |
| 110 | If you install as a non-privileged user everything should install in your local |
| 111 | per-user folders. But: as there is no global PythonCore you can only run applets |
| 112 | if they reside in your toplevel Python folder. |
| 113 | |
| 114 | If you install as a privileged user and then try to run |
| 115 | Python as another (non-privileged) user you may encounter a problem with |
| 116 | not having a preference file: the symptom is failing to import all sorts |
| 117 | of standard modules. If you remove your per-user Python preference files |
Jack Jansen | 3e82872 | 2003-01-08 16:27:44 +0000 | [diff] [blame] | 118 | (in ~/Library/Preferences) and then run PythonInterpreter once everything should |
Jack Jansen | 601b2fd | 2002-04-23 19:50:53 +0000 | [diff] [blame] | 119 | be fine. |
| 120 | |
Jack Jansen | 0b72695 | 1997-10-08 15:34:42 +0000 | [diff] [blame] | 121 | Uninstalling |
| 122 | ------------ |
| 123 | |
Jack Jansen | 3e82872 | 2003-01-08 16:27:44 +0000 | [diff] [blame] | 124 | Up to three items are installed in the MacOS 8 or 9 system folder: the interpreter |
| 125 | shared library PythonCore lives in the Extensions |
Jack Jansen | 5bb97e6 | 2003-02-21 22:33:55 +0000 | [diff] [blame] | 126 | folder and the "Python 2.3a2 Preferences" file in the Python subfolder |
Jack Jansen | 1a29ed7 | 2001-10-31 10:13:52 +0000 | [diff] [blame] | 127 | in the Preferences folder. All the rest of Python lives in the folder |
| 128 | you installed in. |
Jack Jansen | 0b72695 | 1997-10-08 15:34:42 +0000 | [diff] [blame] | 129 | |
Jack Jansen | 3e82872 | 2003-01-08 16:27:44 +0000 | [diff] [blame] | 130 | On OSX the library is installed in /Library/CFMSupport. The ConfigurePython |
Jack Jansen | b952651 | 2001-12-27 23:01:18 +0000 | [diff] [blame] | 131 | applets will complain if you have no right to create the libraries there |
| 132 | (you need Admin privileges). This has one consequence: you will not be able to |
| 133 | run applets unless they reside in the MacPython folder (such as the IDE or |
| 134 | EditPythonPrefs). If you try to run an applet stored elsewhere you will |
| 135 | get a "Cannot locate PythonCore" error message. |
Jack Jansen | c1218bc | 2001-04-25 22:11:24 +0000 | [diff] [blame] | 136 | |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 137 | Things to see |
| 138 | ------------- |
| 139 | |
Jack Jansen | 12a37b7 | 2000-05-06 23:01:07 +0000 | [diff] [blame] | 140 | Start off at Mac:Demo:index.html. Read at least the first few sections. |
| 141 | |
Jack Jansen | 3e82872 | 2003-01-08 16:27:44 +0000 | [diff] [blame] | 142 | There is also a first stab at documentation (plus examples) in the |
| 143 | Mac:Demo folder. The toplevel Demo folder has machine-independent demos. |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 144 | |
Jack Jansen | 1a29ed7 | 2001-10-31 10:13:52 +0000 | [diff] [blame] | 145 | The ":Mac:scripts" folder has some sample scripts. Some are useful, |
| 146 | some are just interesting to look at to see how various things |
| 147 | work. The MkDistr, mkapplet and fullbuild scripts (plus the ones |
| 148 | mentioned above) may help you to understand how to use AppleEvents and |
| 149 | various other toolboxes from python. |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 150 | |
Jack Jansen | 1a29ed7 | 2001-10-31 10:13:52 +0000 | [diff] [blame] | 151 | Other mac-specific goodies can be found in :Mac:Tools, of which the |
| 152 | IDE sources and a CGI framework deserve special mention. |
Jack Jansen | 8a6cdcc | 2000-09-10 12:02:28 +0000 | [diff] [blame] | 153 | |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 154 | 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] | 155 | formats is included, but without documentation. You can find docs at |
| 156 | ftp://ftp.cwi.nl/pub/jack/python/img (or somewhere around there). |
| 157 | |
| 158 | Finally there is a Mac:Contrib folder which contains some contributed |
Jack Jansen | 12a37b7 | 2000-05-06 23:01:07 +0000 | [diff] [blame] | 159 | software. |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 160 | |
| 161 | Upgrading from older Python releases |
| 162 | ------------------------------------ |
| 163 | |
Jack Jansen | 1a29ed7 | 2001-10-31 10:13:52 +0000 | [diff] [blame] | 164 | Python releases are independent of each other, with separate |
| 165 | Preferences files, shared library names, etc. The good news is that |
| 166 | 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] | 167 | whether to upgrade. The bad news is that your old preference settings |
| 168 | are lost and you have to set them again. |
| 169 | |
Jack Jansen | 5bb97e6 | 2003-02-21 22:33:55 +0000 | [diff] [blame] | 170 | After you are satisfied that 2.3a2 works as expected you can trash |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 171 | anything in the system folder that has "python" in the name and not |
Jack Jansen | 5bb97e6 | 2003-02-21 22:33:55 +0000 | [diff] [blame] | 172 | "2.3a2". |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 173 | |
Jack Jansen | 3e82872 | 2003-01-08 16:27:44 +0000 | [diff] [blame] | 174 | The ConfigurePython applet will try to detect incompatible |
Jack Jansen | 1a29ed7 | 2001-10-31 10:13:52 +0000 | [diff] [blame] | 175 | preferences files and offer to remove them. This means that re-running |
| 176 | ConfigurePython after a second install of the same MacPython version |
| 177 | (or after moving the Python folder) should fix things up correctly. |
Jack Jansen | 2b73fe9 | 2001-03-27 21:38:55 +0000 | [diff] [blame] | 178 | |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 179 | The installer |
| 180 | ------------- |
| 181 | |
Jack Jansen | 12a37b7 | 2000-05-06 23:01:07 +0000 | [diff] [blame] | 182 | The installer for this product was created using Installer VISE |
| 183 | from MindVision Software. For more information on Installer VISE, |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 184 | contact: |
| 185 | MindVision Software |
| 186 | 7201 North 7th Street |
| 187 | Lincoln, NE 68521-8913 |
| 188 | Voice: 402-477-3269 |
| 189 | Fax: 402-477-1395 |
| 190 | Internet: mindvision@mindvision.com |
| 191 | http://www.mindvision.com |
| 192 | |
Just van Rossum | d16199a | 2001-12-13 12:58:09 +0000 | [diff] [blame] | 193 | Just van Rossum <just@letterror.com> created the initial version of the |
Jack Jansen | 12a37b7 | 2000-05-06 23:01:07 +0000 | [diff] [blame] | 194 | installer (with Installer Vise Lite), and Jack worked from there. |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 195 | |
Jack Jansen | 01ae9eb | 2000-04-22 22:57:25 +0000 | [diff] [blame] | 196 | Thanks! |
| 197 | ------- |
| 198 | |
Jack Jansen | 0281512 | 2002-08-19 13:17:39 +0000 | [diff] [blame] | 199 | As of Python 2.3 the MacPython thanks list has been merged into the |
| 200 | general acknowledgements, see :Misc:ACKS. |
Jack Jansen | 01ae9eb | 2000-04-22 22:57:25 +0000 | [diff] [blame] | 201 | |
Jack Jansen | 1a29ed7 | 2001-10-31 10:13:52 +0000 | [diff] [blame] | 202 | MacPython includes waste, a TextEdit replacement which is (c) 1998 |
| 203 | Marco Piovanelli. |
Jack Jansen | de51909 | 2000-10-12 21:21:43 +0000 | [diff] [blame] | 204 | |
Jack Jansen | 1a29ed7 | 2001-10-31 10:13:52 +0000 | [diff] [blame] | 205 | A special mention is deserved by Matthias Neeracher, who has written |
| 206 | the brilliant unix-compatible GUSI I/O library, without which |
| 207 | MacPython would not have sockets or select, and to Alexandre |
| 208 | Parenteau, who has ported this library to Carbon. |
Jack Jansen | 9080e9b | 2001-01-23 21:03:52 +0000 | [diff] [blame] | 209 | |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 210 | Feedback |
| 211 | -------- |
| 212 | |
| 213 | Send bug reports, suggestions, contributions and fanmail to |
Jack Jansen | ecbc1cc | 1998-01-06 12:13:16 +0000 | [diff] [blame] | 214 | <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] | 215 | <pythonmac-sig@python.org> mailing list, which is explicitly meant for |
| 216 | this purpose. |
| 217 | |
Jack Jansen | b25ec91 | 2001-03-05 15:44:55 +0000 | [diff] [blame] | 218 | |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 219 | Jack Jansen |
Jack Jansen | b952651 | 2001-12-27 23:01:18 +0000 | [diff] [blame] | 220 | CWI |
| 221 | Kruislaan 413 |
| 222 | 1098 SJ Amsterdam |
Jack Jansen | 83cab72 | 1997-08-26 13:25:06 +0000 | [diff] [blame] | 223 | the Netherlands |
| 224 | |
| 225 | <jack@cwi.nl>, http://www.cwi.nl/~jack |