forked from usnistgov/fipy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMACOSX-INSTALLATION.txt
413 lines (260 loc) · 12.1 KB
/
MACOSX-INSTALLATION.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
.. _MACOSX-INSTALLATION:
============================
Simple Mac OS X Installation
============================
We present four comparatively simple routes to installing :term:`FiPy` on `Mac OS
X`_. The `Fink Installation`_ procedure is appropriate if you are already
familiar with the Fink_ package manager.
`Enthought Python Distribution`_ will get :term:`FiPy` running in a minumum number of
steps. The `Binary Installation`_ procedure is the next most expedient if
you have never heard of Fink_ or if you are not comfortable with it. Please
see the more general :ref:`INSTALLATION` for detailed installation
instructions. These instructions are not the only ways to set up :term:`FiPy` on
`Mac OS X`_ but represent the most expedient ways, from our experience, to
have a usable installation up and running.
.. attention::
You must have an administrator account to install most of the following
packages.
.. _Mac OS X: http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.apple.com/macosx/
.. _Fink: http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://fink.sourceforge.net
Enthought Python Distribution
=============================
http://www.enthought.com/epd
This installer provides a very large number of useful scientific packages
for Python, including Python_, NumPy_, SciPy_, Matplotlib_, and IPython_.
.. attention::
PySparse_ and :term:`FiPy` are not presently included in EPD, so you will need
to separately install them manually.
Binary Installation
===================
.. attention::
Choose this method if you have never heard of Fink_ or if you are not
comfortable with it for any reason. Binary installation is the fastest
way to get :term:`FiPy` up and running, but may offer less flexibility in the
long run.
Pre-built binaries for many of the required packages are available at
http://pythonmac.org/packages/py24-fat/.
.. _pythonmac: http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://pythonmac.org/packages/py24-fat/
Python
------
Python is pre-installed on `Mac OS X`_, but installation of other packages
is much easier if you upgrade to the latest version of
:file:`python-2.{4.X-XXXX-XX-XX}.dmg`` from pythonmac_ (or possibly some variant on
:file:`Universal-MacPython-2.{4.X-XXXX-XX-XX}.dmg``). Your existing
installation will not be harmed.
.. note::
Any command-line instructions that start with ``python`` will either
need to be explicitly typed as ``/usr/local/bin/python`` or you will
need to adjust your ``$path`` variable so that this version of
``python`` is found before the pre-installed version.
.. note::
Another option is ActivePython_, which probably is the most heavily
supported installation on the Mac, but seems to lack `readline` support,
but these instructions
http://www.friday.com/bbum/2006/03/06/python-mac-os-x-and-readline/
worked for us.
.. _ActivePython: http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.activestate.com/Products/ActivePython/
NumPy
-----
Download and install the latest version of
:file:`numpy-{X.XX}-py2.4-macosx10.4.mpkg.zip` from pythonmac_.
matplotlib
----------
In order to see simulation results, you will need a viewer. We recommend
you download and install the latest version of
``matplotlib-X.XX.X-py2.4-macosx10.4.mpkg.zip`` from pythonmac_.
matplotlib requires:
wxPython
~~~~~~~~
Download and install the latest version of
:file:`wxPython{X.X}-osx-unicode-{X.X.X.X}-universal10.4-py2.4.dmg` from
pythonmac_.
PySparse
--------
http://sourceforge.net/project/showfiles.php?group_id=101403
Download and install the latest version of
:file:`pysparse-{X.XX.XXX}.macosx-10.4-py24.dmg`
FiPy
----
http://www.ctcms.nist.gov/fipy/
Download and unpack the source archive (:file:`FiPy-{x.y}.tar.gz`).
From within the :term:`FiPy` directory, execute the command-line instruction::
$ python setup.py build
$ sudo python setup.py install
.. note::
You may now choose to install `Optional Packages`_ or you may choose
proceed directly to `Using FiPy on Mac OS X`_.
Fink Installation
=================
.. attention::
Choose this method if you are already familiar with Fink_ or with Linux_
package managers in general (such as Debian_ packages or RPMs). Fink_
installation takes considerably longer than `Binary Installation`_, but
offers a wealth of other programs that can make it worthwhile.
The Fink_ package manager automatically handles the many intricate
dependencies involved in building open source software. Fink_ is based on
the Debian_ tools and the package manager model will be familiar to Linux_
users.
.. _Debian: http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.debian.org
.. _Linux: http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.linux.org
Xcode Development Tools
-----------------------
http://developer.apple.com/tools/xcode
Some required packages are not available from Fink_ as binaries, so you
will need to have the developer tools for `Mac OS X`_. They may already
be installed in the ``/Developer/`` directory, but a different version may
be required by Fink_; see the recommendations at http://fink.sourceforge.net/download
.. note::
Free registration with the `Apple Developer Connection`_ is required.
.. _Apple Developer Connection:
X11
---
Open the X11 application.
Set your :envvar:`DISPLAY` environment variable to ``:0.0``.
.. note::
If the X11 application is not already present in the
:file:`/Applications/Utilities/` directory, it should be available as an
optional package on the OS installation media that came with your
computer.
Fink
----
http://fink.sourceforge.net/download
Ensure that Fink_ is installed and up to date for your OS.
.. note::
The following steps have been tested with Fink_ 0.8.1 on `Mac OS X`_
10.4 "Tiger". Variations may be necessary for other OS versions.
unstable tree
~~~~~~~~~~~~~
Follow the directions at http://www.finkproject.org/faq/usage-fink.php#unstable
.. note::
We recommend that you accept all defaults presented by
``fink selfupdate``.
.. note::
"unstable" is not as scary as it sounds. The Fink_ administrators tend
to be very conservative about what packages are designated "stable".
Remaining Fink packages
~~~~~~~~~~~~~~~~~~~~~~~
Execute the following commands from Terminal application (you can use
``xterm`` or any other terminal application of your choosing)::
$ fink --use-binary-dist install python
Take note of the version of Python that gets installed (``python
--version``). Many other packages, indicated by a ":samp:`-py{XX}`" suffix, require
you substitute the Python version. E.g., Python 2.4 takes ":samp:`-py24`", Python
2.5 takes ":samp:`-py25`", and so on::
$ fink --use-binary-dist install matplotlib-pyXX
.. attention::
The matplotlib_ installation will automatically download and build a
number of other packages. This process can take quite awhile. We
recommend that you accept all defaults offered at the beginning of this
process.
.. note::
If the installation of :samp:`matplotlib-py{XX}` fails for some reason, we
recommend you execute the ``install`` command again.
A few changes are needed to allow matplotlib_ to run::
$ mkdir ~/.matplotlib
$ curl http://matplotlib.sourceforge.net/_static/matplotlibrc \
> ~/.matplotlib/matplotlibrc
You may now choose to either edit the "backend" configuration in
``~/.matplotlib/matplotlibrc`` to read::
backend : TkAgg
or you can install wxPython with::
$ fink --use-binary-dist install wxpython-pyXX
(the second choice takes awhile, as it needs to build things).
PySparse installation
---------------------
http://sourceforge.net/project/showfiles.php?group_id=101403
Download and unpack the latest version of
:file:`pysparse-{X.XX.XXX}.tar.gz`
From within the PySparse directory, execute::
$ python setup.py build
$ sudo python setup.py install
FiPy installation
-----------------
Install FiPy_ packages as explained above.
.. note::
You may now choose to install `Optional Packages`_ or you may choose
proceed directly to `Using FiPy on Mac OS X`_.
..
Optional Packages
=================
IPython
-------
http://ipython.scipy.org/
This interactive Python shell is nicer to use than the default, and
integrates nicely with matplotlib_. Download the source and follow the
building and installation instructions for `Mac OS X`_.
Gmsh
----
http://www.geuz.org/gmsh
If you wish to run examples that have unstructured meshes, it is
necessary to install Gmsh. Download and unpack the latest version of
Gmsh for `Mac OS X`. Create a link on your ``$path`` or a shell alias that
points to ``<Gmsh path>/Gmsh.app/Contents/MacOS/Gmsh``.
.. note::
This is a required package for superfill examples.
Mayavi
------
http://code.enthought.com/projects/mayavi/
`Mayavi 2`_ is a requirement if you wish to view 3D problems or improve the
viewing capabilities of the superfill examples. The standard instructions
for either installing with `Enthought Python Distribution`_ or installing
manually work fine.
If you have already followed the `Fink Installation`_ instructions, then
you should be able to go to the command line and type::
$ sudo apt-get install mayavi2-pyXX
.. _MayaVi 2: http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://code.enthought.com/projects/mayavi
SciPy
-----
http://www.scipy.org/
This is a very powerful set of tools that augments the capabilities of
:term:`FiPy`. Although not required for using :term:`FiPy`, some tests will fail if it
is not present:
* If you followed the `Binary Installation`_ procedure, there are a few
different choices for obtaining prebuilt binaries of SciPy, each with
their own issues:
- We presently recommend obtaining SciPy from the ScipySuperpack_
.. warning::
We do *not* recommend installing the other components from the
ScipySuperpack_. In particular, matplotlib_ was not usable
when we tried it.
- pythonmac_ includes a build of SciPy, but the latest version we
tried from pythonmac_, ``scipy-0.5.1-py2.4-macosx10.4.mpkg.zip
(MD5: 15daecd1b5709f04a41154102269359f)``, was apparently not
linked correctly and does not work properly, c.f.
http://projects.scipy.org/pipermail/scipy-user/2007-January/010820.html
- We *may* provide builds of SciPy from `our own site`_ if we
conclude that we can better serve :term:`FiPy` users that way.
* If you followed the `Fink Installation`_ procedure, then you should be
able to type::
$ sudo apt-get install scipy-pyXX
.. _ScipySuperpack: http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://trichech.us/?page_id=4
.. _our own site: http://www.ctcms.nist.gov/fipy/download/
.. note::
You are now ready to proceed to `Using FiPy on Mac OS X`_.
Using FiPy on Mac OS X
======================
We do a substantial amount of our :term:`FiPy` development on `Mac OS X`_, so you
can assume that it is well-tested on this platform. See :ref:`sec:UsingFiPy`
for more information.
IDLE Environment
----------------
For those that are averse to the command line, the IDLE_ environment is
installed by the pythonmac_ Python_ installer and will appear in the
MacPython 2.4 folder of the Applications folder.
.. note:: We are not aware of a Fink_ package for IDLE_.
.. attention::
We have no experience with using the IDLE_ environment on `Mac OS X`_,
but the following steps do work.
You can use the IDLE_ file browser to open the examples and run the
module.
- Open the IDLE_ application, located in ``/Applications/MacPython 2.4/``
- Select the Python Shell window.
You can close the Console window if it appears.
- Choose File > Open
- Select ``/Path/To/Base/FiPy/Directory/examples/diffusion/mesh1D.py``
and click the Open button
The script will open in an editor window.
- Choose Run > Run Module
A matplotlib_ viewer should appear and the Python Shell should prompt you
through a series of examples.
.. _IDLE: http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.python.org/idle/