blob: a7dcf37794fad553be3a03ba486c0c764328bb7d [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 Jansena93b3cc2003-06-16 13:57:09 +000076Python and "import test.regrtest ; test.regrtest.main()".
77
78On MacOS 8.6 a number of tests will fail because FSRefs are not
79supported.
Jack Jansende519092000-10-12 21:21:43 +000080
Jack Jansen5bb97e62003-02-21 22:33:55 +000081test_socket and test_logging fail, this problem is being investigated.
Jack Jansen3e828722003-01-08 16:27:44 +000082
Jack Jansen5bb97e62003-02-21 22:33:55 +000083test_tarfile fails, this problem is being investigated.
Jack Jansenb3be2162001-11-30 14:16:36 +000084
Jack Jansenf7e57142001-09-08 21:38:26 +000085Three tests will fail on MacOS9 with MemoryErrors:
Jack Jansen5d528b72001-10-23 22:22:09 +000086test_longexp, test_sha and test_zlib (on MacOSX these should pass).
Jack Jansen2b73fe92001-03-27 21:38:55 +000087
Jack Jansen1a29ed72001-10-31 10:13:52 +000088If you increase the PythonInterpreter memory partition size they will
89pass (but for longexp you have to increase it by an incredible amount,
90400MB is rumoured). It will, however, print some messages about
91optional features not supported. You should not worry about these,
92they are modules that are supported by Python on other
93platforms. Also, if you didn't run compileall before autotesting you
94may run out of memory the first time you run the tests. test_socket
95may also fail if you have no internet connection. Please also read the
96Relnotes file for other minor problems with this distribution.
Jack Jansen83cab721997-08-26 13:25:06 +000097
Jack Jansen1a29ed72001-10-31 10:13:52 +000098Using Python is most easily done from the IDE, which has a builtin
99editor, debugger and other goodies. The alternative is to use
100PythonInterpreter, which is the lowlevel interpreter with a
101console-window only (similar to Unix Python).
Jack Jansen83cab721997-08-26 13:25:06 +0000102
Jack Jansen1a29ed72001-10-31 10:13:52 +0000103If your program uses Tkinter you MUST run it under PythonInterpreter,
104Tkinter and IDE are incompatible and your program will fail in strange
105ways.
Jack Jansen8a6cdcc2000-09-10 12:02:28 +0000106
Jack Jansen601b2fd2002-04-23 19:50:53 +0000107OSX Multiple users note
108-----------------------
109
110Interaction with Mac OS X multiple users has been tested only very lightly.
111If you install as a privileged user everything installs fine.
112
113If you install as a non-privileged user everything should install in your local
114per-user folders. But: as there is no global PythonCore you can only run applets
115if they reside in your toplevel Python folder.
116
117If you install as a privileged user and then try to run
118Python as another (non-privileged) user you may encounter a problem with
119not having a preference file: the symptom is failing to import all sorts
120of standard modules. If you remove your per-user Python preference files
Jack Jansen3e828722003-01-08 16:27:44 +0000121(in ~/Library/Preferences) and then run PythonInterpreter once everything should
Jack Jansen601b2fd2002-04-23 19:50:53 +0000122be fine.
123
Jack Jansen0b726951997-10-08 15:34:42 +0000124Uninstalling
125------------
126
Jack Jansen3e828722003-01-08 16:27:44 +0000127Up to three items are installed in the MacOS 8 or 9 system folder: the interpreter
128shared library PythonCore lives in the Extensions
Jack Jansen5bb97e62003-02-21 22:33:55 +0000129folder and the "Python 2.3a2 Preferences" file in the Python subfolder
Jack Jansen1a29ed72001-10-31 10:13:52 +0000130in the Preferences folder. All the rest of Python lives in the folder
131you installed in.
Jack Jansen0b726951997-10-08 15:34:42 +0000132
Jack Jansen3e828722003-01-08 16:27:44 +0000133On OSX the library is installed in /Library/CFMSupport. The ConfigurePython
Jack Jansenb9526512001-12-27 23:01:18 +0000134applets will complain if you have no right to create the libraries there
135(you need Admin privileges). This has one consequence: you will not be able to
136run applets unless they reside in the MacPython folder (such as the IDE or
137EditPythonPrefs). If you try to run an applet stored elsewhere you will
138get a "Cannot locate PythonCore" error message.
Jack Jansenc1218bc2001-04-25 22:11:24 +0000139
Jack Jansen83cab721997-08-26 13:25:06 +0000140Things to see
141-------------
142
Jack Jansen12a37b72000-05-06 23:01:07 +0000143Start off at Mac:Demo:index.html. Read at least the first few sections.
144
Jack Jansen3e828722003-01-08 16:27:44 +0000145There is also a first stab at documentation (plus examples) in the
146Mac:Demo folder. The toplevel Demo folder has machine-independent demos.
Jack Jansen83cab721997-08-26 13:25:06 +0000147
Jack Jansen1a29ed72001-10-31 10:13:52 +0000148The ":Mac:scripts" folder has some sample scripts. Some are useful,
149some are just interesting to look at to see how various things
150work. The MkDistr, mkapplet and fullbuild scripts (plus the ones
151mentioned above) may help you to understand how to use AppleEvents and
152various other toolboxes from python.
Jack Jansen83cab721997-08-26 13:25:06 +0000153
Jack Jansen1a29ed72001-10-31 10:13:52 +0000154Other mac-specific goodies can be found in :Mac:Tools, of which the
155IDE sources and a CGI framework deserve special mention.
Jack Jansen8a6cdcc2000-09-10 12:02:28 +0000156
Jack Jansen83cab721997-08-26 13:25:06 +0000157The 'img' group of modules, which handles I/O of many different image
Jack Jansend0ddb661998-04-27 15:14:36 +0000158formats is included, but without documentation. You can find docs at
159ftp://ftp.cwi.nl/pub/jack/python/img (or somewhere around there).
160
161Finally there is a Mac:Contrib folder which contains some contributed
Jack Jansen12a37b72000-05-06 23:01:07 +0000162software.
Jack Jansen83cab721997-08-26 13:25:06 +0000163
164Upgrading from older Python releases
165------------------------------------
166
Jack Jansen1a29ed72001-10-31 10:13:52 +0000167Python releases are independent of each other, with separate
168Preferences files, shared library names, etc. The good news is that
169this means you can keep your older version around if you are unsure
Jack Jansen83cab721997-08-26 13:25:06 +0000170whether to upgrade. The bad news is that your old preference settings
171are lost and you have to set them again.
172
Jack Jansen5bb97e62003-02-21 22:33:55 +0000173After you are satisfied that 2.3a2 works as expected you can trash
Jack Jansen83cab721997-08-26 13:25:06 +0000174anything in the system folder that has "python" in the name and not
Jack Jansen5bb97e62003-02-21 22:33:55 +0000175"2.3a2".
Jack Jansen83cab721997-08-26 13:25:06 +0000176
Jack Jansen3e828722003-01-08 16:27:44 +0000177The ConfigurePython applet will try to detect incompatible
Jack Jansen1a29ed72001-10-31 10:13:52 +0000178preferences files and offer to remove them. This means that re-running
179ConfigurePython after a second install of the same MacPython version
180(or after moving the Python folder) should fix things up correctly.
Jack Jansen2b73fe92001-03-27 21:38:55 +0000181
Jack Jansen83cab721997-08-26 13:25:06 +0000182The installer
183-------------
184
Jack Jansen12a37b72000-05-06 23:01:07 +0000185The installer for this product was created using Installer VISE
186from MindVision Software. For more information on Installer VISE,
Jack Jansen83cab721997-08-26 13:25:06 +0000187contact:
188MindVision Software
1897201 North 7th Street
190Lincoln, NE 68521-8913
191Voice: 402-477-3269
192Fax: 402-477-1395
193Internet: mindvision@mindvision.com
194http://www.mindvision.com
195
Just van Rossumd16199a2001-12-13 12:58:09 +0000196Just van Rossum <just@letterror.com> created the initial version of the
Jack Jansen12a37b72000-05-06 23:01:07 +0000197installer (with Installer Vise Lite), and Jack worked from there.
Jack Jansen83cab721997-08-26 13:25:06 +0000198
Jack Jansen01ae9eb2000-04-22 22:57:25 +0000199Thanks!
200-------
201
Jack Jansen02815122002-08-19 13:17:39 +0000202As of Python 2.3 the MacPython thanks list has been merged into the
203general acknowledgements, see :Misc:ACKS.
Jack Jansen01ae9eb2000-04-22 22:57:25 +0000204
Jack Jansen1a29ed72001-10-31 10:13:52 +0000205MacPython includes waste, a TextEdit replacement which is (c) 1998
206Marco Piovanelli.
Jack Jansende519092000-10-12 21:21:43 +0000207
Jack Jansen1a29ed72001-10-31 10:13:52 +0000208A special mention is deserved by Matthias Neeracher, who has written
209the brilliant unix-compatible GUSI I/O library, without which
210MacPython would not have sockets or select, and to Alexandre
211Parenteau, who has ported this library to Carbon.
Jack Jansen9080e9b2001-01-23 21:03:52 +0000212
Jack Jansen83cab721997-08-26 13:25:06 +0000213Feedback
214--------
215
216Send bug reports, suggestions, contributions and fanmail to
Jack Jansenecbc1cc1998-01-06 12:13:16 +0000217<jack@cwi.nl>. However, a better way to discuss MacPython is to join the
Jack Jansen83cab721997-08-26 13:25:06 +0000218<pythonmac-sig@python.org> mailing list, which is explicitly meant for
219this purpose.
220
Jack Jansenb25ec912001-03-05 15:44:55 +0000221
Jack Jansen83cab721997-08-26 13:25:06 +0000222Jack Jansen
Jack Jansenb9526512001-12-27 23:01:18 +0000223CWI
224Kruislaan 413
2251098 SJ Amsterdam
Jack Jansen83cab721997-08-26 13:25:06 +0000226the Netherlands
227
228<jack@cwi.nl>, http://www.cwi.nl/~jack