blob: d5ea8f3c3d5633de6534cc9772bc78938b752722 [file] [log] [blame]
Jack Jansen5bb97e62003-02-21 22:33:55 +00001How to install MacPython-OS9 2.3a2 on your Macintosh
Jack Jansen3e828722003-01-08 16:27:44 +00002----------------------------------------------------
Jack Jansen2f9a9e32001-02-17 22:03:42 +00003
Jack Jansen3e828722003-01-08 16:27:44 +00004This is a MacPython that can run on Mac OS 8.6 with CarbonLib
5installed, Mac OS 9 and Mac OS X. It is the direct successor of MacPython 2.2.
Jack Jansen2f9a9e32001-02-17 22:03:42 +00006
Jack Jansen3e828722003-01-08 16:27:44 +00007For Mac OS X users: you are probably better off with the normal unix distribution
8of Python. That version also runs from the commandline, and if you do a framework
9build it will contain all the functionality of this version too. A prebuilt
10version will be available starting with the beta distributions.
Jack Jansen2f9a9e32001-02-17 22:03:42 +000011
Jack Jansen3e828722003-01-08 16:27:44 +000012If you are upgrading from a previous MacPython you should read :Misc:NEWS,
13which lists the new features of this Python release. As of this release
14the Mac-specific release notes have been moved to the "Mac" section of
15the general NEWS file.
16
17Two 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 Jansen5bb97e62003-02-21 22:33:55 +000021 Carbon package. For 2.3a2 only this wrapping is incomplete: fsspec.SetDates()
Jack Jansen3e828722003-01-08 16:27:44 +000022 does not work yet. If you encounter any other problems please report them.
Jack Jansen8ef786e2001-03-15 14:27:09 +000023
Jack Jansen2f9a9e32001-02-17 22:03:42 +000024------
Jack Jansen83cab721997-08-26 13:25:06 +000025
26If this is your first encounter with Python: you definitely need the
27common user documentation (common to all platforms). You can find this
Jack Jansen538bd132000-10-19 21:58:27 +000028(in various forms) on www.pythonlabs.com, www.python.org and
29ftp.python.org. Through there, or via
30http://www.cwi.nl/~jack/macpython.html you can also find the most recent
31MacPython distribution.
Jack Jansen83cab721997-08-26 13:25:06 +000032
33Mac-specific documentation is included in this distribution in folder
34Mac:Demo. The documentation is sparse, but it will have to serve for
35now. The documentation is in HTML format, start with index.html.
36
Jack Jansen3e828722003-01-08 16:27:44 +000037If you want a MacPython that runs on systems without Carbon support (8.1
38up to 8.6 without CarbonLib) you should get MacPython 2.2.2.
Jack Jansenecbc1cc1998-01-06 12:13:16 +000039
Jack Jansenb9526512001-12-27 23:01:18 +000040If you want 68k support you will have get MacPython 1.5.2.
Jack Jansen965226b2000-09-14 20:58:24 +000041
Jack Jansen83cab721997-08-26 13:25:06 +000042What to install
43---------------
44
Jack Jansen12a37b72000-05-06 23:01:07 +000045The optional parts in this distribution are
Jack Jansen3e828722003-01-08 16:27:44 +000046- 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 Jansen12a37b72000-05-06 23:01:07 +000049- 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 Jansen3e828722003-01-08 16:27:44 +000053 on matrices and such. This is version 22.
Jack Jansen1a29ed72001-10-31 10:13:52 +000054- 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 Jansen12a37b72000-05-06 23:01:07 +000056All these except the DevKit are installed with Easy Install.
Jack Jansen83cab721997-08-26 13:25:06 +000057
Jack Jansen3e828722003-01-08 16:27:44 +000058After the installer finishes it automatically launches the
59ConfigurePython applet, to finish configuration of your Python.
Jack Jansen83cab721997-08-26 13:25:06 +000060
Jack Jansen1a29ed72001-10-31 10:13:52 +000061Moving your Python installation after installing is generally not a
62good idea. If you have to do this anyway you should remove your
63preference file, run ConfigurePython and remove all .pyc
64files. (there's a script zappyc.py that does the latter).
Jack Jansen2e42bdd2000-11-14 20:37:37 +000065
Jack Jansen83cab721997-08-26 13:25:06 +000066If you don't have enough memory: the sizes choosen are somewhat
Jack Jansen1a29ed72001-10-31 10:13:52 +000067arbitrary, and they are as high as they are so that test.autotest runs
68with fewer problems. An average Python program can make do with much
69less memory. Try lowering the application sizes in the finder "get
70info" window, and seeing whether the resulting python is still usable.
Jack Jansen83cab721997-08-26 13:25:06 +000071
Jack Jansen83cab721997-08-26 13:25:06 +000072After installing
73----------------
74
Jack Jansen8a6cdcc2000-09-10 12:02:28 +000075It is probably a good idea to run the automatic tests. Start
Jack Jansenf7e57142001-09-08 21:38:26 +000076Python and "import test.regrtest ; test.regrtest.main()".
Jack Jansende519092000-10-12 21:21:43 +000077
Jack Jansen5bb97e62003-02-21 22:33:55 +000078test_socket and test_logging fail, this problem is being investigated.
Jack Jansen3e828722003-01-08 16:27:44 +000079
Jack Jansen5bb97e62003-02-21 22:33:55 +000080test_tarfile fails, this problem is being investigated.
Jack Jansenb3be2162001-11-30 14:16:36 +000081
Jack Jansenf7e57142001-09-08 21:38:26 +000082Three tests will fail on MacOS9 with MemoryErrors:
Jack Jansen5d528b72001-10-23 22:22:09 +000083test_longexp, test_sha and test_zlib (on MacOSX these should pass).
Jack Jansen2b73fe92001-03-27 21:38:55 +000084
Jack Jansen1a29ed72001-10-31 10:13:52 +000085If you increase the PythonInterpreter memory partition size they will
86pass (but for longexp you have to increase it by an incredible amount,
87400MB is rumoured). It will, however, print some messages about
88optional features not supported. You should not worry about these,
89they are modules that are supported by Python on other
90platforms. Also, if you didn't run compileall before autotesting you
91may run out of memory the first time you run the tests. test_socket
92may also fail if you have no internet connection. Please also read the
93Relnotes file for other minor problems with this distribution.
Jack Jansen83cab721997-08-26 13:25:06 +000094
Jack Jansen1a29ed72001-10-31 10:13:52 +000095Using Python is most easily done from the IDE, which has a builtin
96editor, debugger and other goodies. The alternative is to use
97PythonInterpreter, which is the lowlevel interpreter with a
98console-window only (similar to Unix Python).
Jack Jansen83cab721997-08-26 13:25:06 +000099
Jack Jansen1a29ed72001-10-31 10:13:52 +0000100If your program uses Tkinter you MUST run it under PythonInterpreter,
101Tkinter and IDE are incompatible and your program will fail in strange
102ways.
Jack Jansen8a6cdcc2000-09-10 12:02:28 +0000103
Jack Jansen601b2fd2002-04-23 19:50:53 +0000104OSX Multiple users note
105-----------------------
106
107Interaction with Mac OS X multiple users has been tested only very lightly.
108If you install as a privileged user everything installs fine.
109
110If you install as a non-privileged user everything should install in your local
111per-user folders. But: as there is no global PythonCore you can only run applets
112if they reside in your toplevel Python folder.
113
114If you install as a privileged user and then try to run
115Python as another (non-privileged) user you may encounter a problem with
116not having a preference file: the symptom is failing to import all sorts
117of standard modules. If you remove your per-user Python preference files
Jack Jansen3e828722003-01-08 16:27:44 +0000118(in ~/Library/Preferences) and then run PythonInterpreter once everything should
Jack Jansen601b2fd2002-04-23 19:50:53 +0000119be fine.
120
Jack Jansen0b726951997-10-08 15:34:42 +0000121Uninstalling
122------------
123
Jack Jansen3e828722003-01-08 16:27:44 +0000124Up to three items are installed in the MacOS 8 or 9 system folder: the interpreter
125shared library PythonCore lives in the Extensions
Jack Jansen5bb97e62003-02-21 22:33:55 +0000126folder and the "Python 2.3a2 Preferences" file in the Python subfolder
Jack Jansen1a29ed72001-10-31 10:13:52 +0000127in the Preferences folder. All the rest of Python lives in the folder
128you installed in.
Jack Jansen0b726951997-10-08 15:34:42 +0000129
Jack Jansen3e828722003-01-08 16:27:44 +0000130On OSX the library is installed in /Library/CFMSupport. The ConfigurePython
Jack Jansenb9526512001-12-27 23:01:18 +0000131applets 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
133run applets unless they reside in the MacPython folder (such as the IDE or
134EditPythonPrefs). If you try to run an applet stored elsewhere you will
135get a "Cannot locate PythonCore" error message.
Jack Jansenc1218bc2001-04-25 22:11:24 +0000136
Jack Jansen83cab721997-08-26 13:25:06 +0000137Things to see
138-------------
139
Jack Jansen12a37b72000-05-06 23:01:07 +0000140Start off at Mac:Demo:index.html. Read at least the first few sections.
141
Jack Jansen3e828722003-01-08 16:27:44 +0000142There is also a first stab at documentation (plus examples) in the
143Mac:Demo folder. The toplevel Demo folder has machine-independent demos.
Jack Jansen83cab721997-08-26 13:25:06 +0000144
Jack Jansen1a29ed72001-10-31 10:13:52 +0000145The ":Mac:scripts" folder has some sample scripts. Some are useful,
146some are just interesting to look at to see how various things
147work. The MkDistr, mkapplet and fullbuild scripts (plus the ones
148mentioned above) may help you to understand how to use AppleEvents and
149various other toolboxes from python.
Jack Jansen83cab721997-08-26 13:25:06 +0000150
Jack Jansen1a29ed72001-10-31 10:13:52 +0000151Other mac-specific goodies can be found in :Mac:Tools, of which the
152IDE sources and a CGI framework deserve special mention.
Jack Jansen8a6cdcc2000-09-10 12:02:28 +0000153
Jack Jansen83cab721997-08-26 13:25:06 +0000154The 'img' group of modules, which handles I/O of many different image
Jack Jansend0ddb661998-04-27 15:14:36 +0000155formats is included, but without documentation. You can find docs at
156ftp://ftp.cwi.nl/pub/jack/python/img (or somewhere around there).
157
158Finally there is a Mac:Contrib folder which contains some contributed
Jack Jansen12a37b72000-05-06 23:01:07 +0000159software.
Jack Jansen83cab721997-08-26 13:25:06 +0000160
161Upgrading from older Python releases
162------------------------------------
163
Jack Jansen1a29ed72001-10-31 10:13:52 +0000164Python releases are independent of each other, with separate
165Preferences files, shared library names, etc. The good news is that
166this means you can keep your older version around if you are unsure
Jack Jansen83cab721997-08-26 13:25:06 +0000167whether to upgrade. The bad news is that your old preference settings
168are lost and you have to set them again.
169
Jack Jansen5bb97e62003-02-21 22:33:55 +0000170After you are satisfied that 2.3a2 works as expected you can trash
Jack Jansen83cab721997-08-26 13:25:06 +0000171anything in the system folder that has "python" in the name and not
Jack Jansen5bb97e62003-02-21 22:33:55 +0000172"2.3a2".
Jack Jansen83cab721997-08-26 13:25:06 +0000173
Jack Jansen3e828722003-01-08 16:27:44 +0000174The ConfigurePython applet will try to detect incompatible
Jack Jansen1a29ed72001-10-31 10:13:52 +0000175preferences files and offer to remove them. This means that re-running
176ConfigurePython after a second install of the same MacPython version
177(or after moving the Python folder) should fix things up correctly.
Jack Jansen2b73fe92001-03-27 21:38:55 +0000178
Jack Jansen83cab721997-08-26 13:25:06 +0000179The installer
180-------------
181
Jack Jansen12a37b72000-05-06 23:01:07 +0000182The installer for this product was created using Installer VISE
183from MindVision Software. For more information on Installer VISE,
Jack Jansen83cab721997-08-26 13:25:06 +0000184contact:
185MindVision Software
1867201 North 7th Street
187Lincoln, NE 68521-8913
188Voice: 402-477-3269
189Fax: 402-477-1395
190Internet: mindvision@mindvision.com
191http://www.mindvision.com
192
Just van Rossumd16199a2001-12-13 12:58:09 +0000193Just van Rossum <just@letterror.com> created the initial version of the
Jack Jansen12a37b72000-05-06 23:01:07 +0000194installer (with Installer Vise Lite), and Jack worked from there.
Jack Jansen83cab721997-08-26 13:25:06 +0000195
Jack Jansen01ae9eb2000-04-22 22:57:25 +0000196Thanks!
197-------
198
Jack Jansen02815122002-08-19 13:17:39 +0000199As of Python 2.3 the MacPython thanks list has been merged into the
200general acknowledgements, see :Misc:ACKS.
Jack Jansen01ae9eb2000-04-22 22:57:25 +0000201
Jack Jansen1a29ed72001-10-31 10:13:52 +0000202MacPython includes waste, a TextEdit replacement which is (c) 1998
203Marco Piovanelli.
Jack Jansende519092000-10-12 21:21:43 +0000204
Jack Jansen1a29ed72001-10-31 10:13:52 +0000205A special mention is deserved by Matthias Neeracher, who has written
206the brilliant unix-compatible GUSI I/O library, without which
207MacPython would not have sockets or select, and to Alexandre
208Parenteau, who has ported this library to Carbon.
Jack Jansen9080e9b2001-01-23 21:03:52 +0000209
Jack Jansen83cab721997-08-26 13:25:06 +0000210Feedback
211--------
212
213Send bug reports, suggestions, contributions and fanmail to
Jack Jansenecbc1cc1998-01-06 12:13:16 +0000214<jack@cwi.nl>. However, a better way to discuss MacPython is to join the
Jack Jansen83cab721997-08-26 13:25:06 +0000215<pythonmac-sig@python.org> mailing list, which is explicitly meant for
216this purpose.
217
Jack Jansenb25ec912001-03-05 15:44:55 +0000218
Jack Jansen83cab721997-08-26 13:25:06 +0000219Jack Jansen
Jack Jansenb9526512001-12-27 23:01:18 +0000220CWI
221Kruislaan 413
2221098 SJ Amsterdam
Jack Jansen83cab721997-08-26 13:25:06 +0000223the Netherlands
224
225<jack@cwi.nl>, http://www.cwi.nl/~jack