blob: f08ce6e180769062dadb7620e3a6f824b134dda0 [file] [log] [blame]
Jack Jansen3e828722003-01-08 16:27:44 +00001How to install MacPython-OS9 2.3a1 on your Macintosh
2----------------------------------------------------
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
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 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 Jansen3e828722003-01-08 16:27:44 +000078test_httplib fails with an unexpected output error,
79this problem is being investigated.
80
81test_socket fails, this problem is being investigated.
Jack Jansenb3be2162001-11-30 14:16:36 +000082
Jack Jansenf7e57142001-09-08 21:38:26 +000083Three tests will fail on MacOS9 with MemoryErrors:
Jack Jansen5d528b72001-10-23 22:22:09 +000084test_longexp, test_sha and test_zlib (on MacOSX these should pass).
Jack Jansen2b73fe92001-03-27 21:38:55 +000085
Jack Jansen1a29ed72001-10-31 10:13:52 +000086If you increase the PythonInterpreter memory partition size they will
87pass (but for longexp you have to increase it by an incredible amount,
88400MB is rumoured). It will, however, print some messages about
89optional features not supported. You should not worry about these,
90they are modules that are supported by Python on other
91platforms. Also, if you didn't run compileall before autotesting you
92may run out of memory the first time you run the tests. test_socket
93may also fail if you have no internet connection. Please also read the
94Relnotes file for other minor problems with this distribution.
Jack Jansen83cab721997-08-26 13:25:06 +000095
Jack Jansen1a29ed72001-10-31 10:13:52 +000096Using Python is most easily done from the IDE, which has a builtin
97editor, debugger and other goodies. The alternative is to use
98PythonInterpreter, which is the lowlevel interpreter with a
99console-window only (similar to Unix Python).
Jack Jansen83cab721997-08-26 13:25:06 +0000100
Jack Jansen1a29ed72001-10-31 10:13:52 +0000101If your program uses Tkinter you MUST run it under PythonInterpreter,
102Tkinter and IDE are incompatible and your program will fail in strange
103ways.
Jack Jansen8a6cdcc2000-09-10 12:02:28 +0000104
Jack Jansen601b2fd2002-04-23 19:50:53 +0000105OSX Multiple users note
106-----------------------
107
108Interaction with Mac OS X multiple users has been tested only very lightly.
109If you install as a privileged user everything installs fine.
110
111If you install as a non-privileged user everything should install in your local
112per-user folders. But: as there is no global PythonCore you can only run applets
113if they reside in your toplevel Python folder.
114
115If you install as a privileged user and then try to run
116Python as another (non-privileged) user you may encounter a problem with
117not having a preference file: the symptom is failing to import all sorts
118of standard modules. If you remove your per-user Python preference files
Jack Jansen3e828722003-01-08 16:27:44 +0000119(in ~/Library/Preferences) and then run PythonInterpreter once everything should
Jack Jansen601b2fd2002-04-23 19:50:53 +0000120be fine.
121
Jack Jansen0b726951997-10-08 15:34:42 +0000122Uninstalling
123------------
124
Jack Jansen3e828722003-01-08 16:27:44 +0000125Up to three items are installed in the MacOS 8 or 9 system folder: the interpreter
126shared library PythonCore lives in the Extensions
127folder and the "Python 2.3a1 Preferences" file in the Python subfolder
Jack Jansen1a29ed72001-10-31 10:13:52 +0000128in the Preferences folder. All the rest of Python lives in the folder
129you installed in.
Jack Jansen0b726951997-10-08 15:34:42 +0000130
Jack Jansen3e828722003-01-08 16:27:44 +0000131On OSX the library is installed in /Library/CFMSupport. The ConfigurePython
Jack Jansenb9526512001-12-27 23:01:18 +0000132applets 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
134run applets unless they reside in the MacPython folder (such as the IDE or
135EditPythonPrefs). If you try to run an applet stored elsewhere you will
136get a "Cannot locate PythonCore" error message.
Jack Jansenc1218bc2001-04-25 22:11:24 +0000137
Jack Jansen83cab721997-08-26 13:25:06 +0000138Things to see
139-------------
140
Jack Jansen12a37b72000-05-06 23:01:07 +0000141Start off at Mac:Demo:index.html. Read at least the first few sections.
142
Jack Jansen3e828722003-01-08 16:27:44 +0000143There is also a first stab at documentation (plus examples) in the
144Mac:Demo folder. The toplevel Demo folder has machine-independent demos.
Jack Jansen83cab721997-08-26 13:25:06 +0000145
Jack Jansen1a29ed72001-10-31 10:13:52 +0000146The ":Mac:scripts" folder has some sample scripts. Some are useful,
147some are just interesting to look at to see how various things
148work. The MkDistr, mkapplet and fullbuild scripts (plus the ones
149mentioned above) may help you to understand how to use AppleEvents and
150various other toolboxes from python.
Jack Jansen83cab721997-08-26 13:25:06 +0000151
Jack Jansen1a29ed72001-10-31 10:13:52 +0000152Other mac-specific goodies can be found in :Mac:Tools, of which the
153IDE sources and a CGI framework deserve special mention.
Jack Jansen8a6cdcc2000-09-10 12:02:28 +0000154
Jack Jansen83cab721997-08-26 13:25:06 +0000155The 'img' group of modules, which handles I/O of many different image
Jack Jansend0ddb661998-04-27 15:14:36 +0000156formats is included, but without documentation. You can find docs at
157ftp://ftp.cwi.nl/pub/jack/python/img (or somewhere around there).
158
159Finally there is a Mac:Contrib folder which contains some contributed
Jack Jansen12a37b72000-05-06 23:01:07 +0000160software.
Jack Jansen83cab721997-08-26 13:25:06 +0000161
162Upgrading from older Python releases
163------------------------------------
164
Jack Jansen1a29ed72001-10-31 10:13:52 +0000165Python releases are independent of each other, with separate
166Preferences files, shared library names, etc. The good news is that
167this means you can keep your older version around if you are unsure
Jack Jansen83cab721997-08-26 13:25:06 +0000168whether to upgrade. The bad news is that your old preference settings
169are lost and you have to set them again.
170
Jack Jansen3e828722003-01-08 16:27:44 +0000171After you are satisfied that 2.3a1 works as expected you can trash
Jack Jansen83cab721997-08-26 13:25:06 +0000172anything in the system folder that has "python" in the name and not
Jack Jansen3e828722003-01-08 16:27:44 +0000173"2.3a1".
Jack Jansen83cab721997-08-26 13:25:06 +0000174
Jack Jansen3e828722003-01-08 16:27:44 +0000175The ConfigurePython applet will try to detect incompatible
Jack Jansen1a29ed72001-10-31 10:13:52 +0000176preferences files and offer to remove them. This means that re-running
177ConfigurePython after a second install of the same MacPython version
178(or after moving the Python folder) should fix things up correctly.
Jack Jansen2b73fe92001-03-27 21:38:55 +0000179
Jack Jansen83cab721997-08-26 13:25:06 +0000180The installer
181-------------
182
Jack Jansen12a37b72000-05-06 23:01:07 +0000183The installer for this product was created using Installer VISE
184from MindVision Software. For more information on Installer VISE,
Jack Jansen83cab721997-08-26 13:25:06 +0000185contact:
186MindVision Software
1877201 North 7th Street
188Lincoln, NE 68521-8913
189Voice: 402-477-3269
190Fax: 402-477-1395
191Internet: mindvision@mindvision.com
192http://www.mindvision.com
193
Just van Rossumd16199a2001-12-13 12:58:09 +0000194Just van Rossum <just@letterror.com> created the initial version of the
Jack Jansen12a37b72000-05-06 23:01:07 +0000195installer (with Installer Vise Lite), and Jack worked from there.
Jack Jansen83cab721997-08-26 13:25:06 +0000196
Jack Jansen01ae9eb2000-04-22 22:57:25 +0000197Thanks!
198-------
199
Jack Jansen02815122002-08-19 13:17:39 +0000200As of Python 2.3 the MacPython thanks list has been merged into the
201general acknowledgements, see :Misc:ACKS.
Jack Jansen01ae9eb2000-04-22 22:57:25 +0000202
Jack Jansen1a29ed72001-10-31 10:13:52 +0000203MacPython includes waste, a TextEdit replacement which is (c) 1998
204Marco Piovanelli.
Jack Jansende519092000-10-12 21:21:43 +0000205
Jack Jansen1a29ed72001-10-31 10:13:52 +0000206A special mention is deserved by Matthias Neeracher, who has written
207the brilliant unix-compatible GUSI I/O library, without which
208MacPython would not have sockets or select, and to Alexandre
209Parenteau, who has ported this library to Carbon.
Jack Jansen9080e9b2001-01-23 21:03:52 +0000210
Jack Jansen83cab721997-08-26 13:25:06 +0000211Feedback
212--------
213
214Send bug reports, suggestions, contributions and fanmail to
Jack Jansenecbc1cc1998-01-06 12:13:16 +0000215<jack@cwi.nl>. However, a better way to discuss MacPython is to join the
Jack Jansen83cab721997-08-26 13:25:06 +0000216<pythonmac-sig@python.org> mailing list, which is explicitly meant for
217this purpose.
218
Jack Jansenb25ec912001-03-05 15:44:55 +0000219
Jack Jansen83cab721997-08-26 13:25:06 +0000220Jack Jansen
Jack Jansenb9526512001-12-27 23:01:18 +0000221CWI
222Kruislaan 413
2231098 SJ Amsterdam
Jack Jansen83cab721997-08-26 13:25:06 +0000224the Netherlands
225
226<jack@cwi.nl>, http://www.cwi.nl/~jack