Presentation Supercomputing Computer Database SIEpedia SIE News

Follow @SIEie_IAC
Logo SIE

Astronomical Software for Mac OS X

With the arrival of a brand-new iMac with Lion (v10.7.4) in August 2012, the SIE is ready to give some basic support for the installation of astronomical software in Mac OS X. The iMac has been subsequently updated through various versions to High Sierra 10.13.6.

As our experience with this OS is not a good as with Linux, please bear with us if we are unable to help you with the installation of the package you need (other than the ones listed below).

As software installation in a Mac can be achieved through different means (downloading the .dmg file, using MacPorts, Homebrew, compiling from source, etc.), it helps if you try to keep the configuration of your Mac as much aligned as possible with that of our iMac, which we consider as the reference platform (data below as of September 2018):

General Mac OS X Resources

The AstroBetter site, among many interesting posts and discussions on science and technology in general, provides a lot of info and tips about Mac OS X for astronomy.

OS X for Astronomers helps you set up your Apple computer for professional astronomy, while OS X Astro Tricks contain "tips and bug fixes for running astronomy-related software on OS X".

Astroconda

Astroconda is an easy-to-install package which includes IRAF, DS9, and many tools to analyze data from the Hubble Space Telescope, the James Webb Space Telescope, and others. It is based on Conda, an open-source software package management system provided and maintained by Continuum Analytics. It permits installation without requiring system privileges. For further details and for installation instructions, see https://astroconda.readthedocs.io/en/latest/.

Individual Packages

If you prefer to install yourself individual packages instead of an "all-in-one" distribution such as Scisoft, here go some pointers.

C and Fortran compilers We installed the v7.3 release (both gfortran and gcc) from High Performance Computing for Mac OS X. Alternatively, the gfortran maintainers offer nice Apple-style installers for a variety of Mac OS X releases, see http://gcc.gnu.org/wiki/GFortranBinaries#MacOS.
In general you will find multiple gcc/gfortran versions in your Mac (the macOS's one, the one installed with MacPorts, the other you got from HPC), and this will be bound to cause some confusion (for instance compilation of some particular package succeeds with one compiler and fails with another). In general, to specify which gcc compiler you wish to use, just define the variable:
export CC="/usr/local/bin/gcc"  (this selects the HPC version).
DAOPHOT I managed to compile (with gfortran) and install DAOPHOT in 64bit linking against IRAF v2.16 libraries. Some changes were required in the Makefile, and one of the source files had to be edited to correct a statement that threw an error upon compilation. If you have a legitimate copy of DAOPHOT's source code and wish to install it on a Mac, get in touch with us.
DS9 Download and install the appropriate DS9 binary from http://ds9.si.edu/site/Download.html. Do not install v7.6 though (try the latest 7.5 stable versions).
Gipsy The installation procedure was a little convoluted, and required a slight modification of the setup file, but at the end it worked out (not the Python wrapper though). If you need help to install Gipsy in your Mac, get in touch with us.
HEAsoft Compilation is straightforward, you only need to be careful about what specific compilers you use. See the HEAsoft Supported platforms page for details. The combination of compilers/flags that worked for me was:
export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
export FC=/usr/local/bin/gfortran
export PERL=/usr/bin/perl
export PATH=/usr/bin:${PATH}
IRAF The best option is to install AstroConda with the Legacy Software Stack (with IRAF) Alternatively, you can download and install IRAF for MacIntel from the IRAF website: step-by-step instructions can be found in the SIEpedia article How to install IRAF 2.16 in Mac OS X.
IDL For IAC users, instructions on how to install IDL in a Mac can be found in file: /net/nas4/inves2/sieinves/invsoft1/IDL_installation_instructions.txt.
There you can also find how to use the IAC floating licenses, or borrow temporarily an IDL license.
LaTeX MacTeX seems to be the most popular LaTeX distribution for Mac. We installed it from http://www.tug.org/mactex/. You may also wish to install TeXShop. Please read the instructions on the MacTex webpage about configuring GUI programs to use the appropriate symlink to the executables directory.
Mathematica Ask us for the .dmg file to install the latest Mathematica release. When launching Mathematica for the first time, click on "Other ways to activate", select "Connect to a network license server" and type "zuko" (without quotation marks) in the Server name box. Then click "Activate". That's it.
MIDAS You will have to compile the source code yourself. Visit: http://www.eso.org/sci/software/esomidas/ for further details about MIDAS and for download/installation instructions. The installations was at little convoluted with several problems, which however could be overcome (thanks to some tips found on the MIDAS help mailing list). Ask us if interested.
Python Python 2.7 and 3.6 (plus several python scientific packages such as numpy, scipy, matplotlib, etc.) were installed using MacPorts, following the instructions in MacPorts Python installation on Mac - 10 easy steps.
Alternatively, one can install the Anaconda Python distribution.
STSCI_Python It is part of the AstroConda package.
If for some reasons you prefer to install it by hand, you can do it using pip (notice that it is not fully compatible with Python 3) it can be easily installed from the tarfile. The only caveats are that I had to use the HPC's gcc compiler, and set the --user flag (as explained in the MacPorts Python link above). Basically, what I did was:
export CC="/usr/local/bin/gcc"
pip-2.7 install --user --upgrade d2to1
pip-2.7 install --user --upgrade stscipython

The PyRAF command will be in ~/Library/Python/2.7/bin/pyraf (you can create an alias, or make a symlink in /usr/local/bin/) Again
Starlink We downloaded and installed the 2017A release for OS X (64-bit, Intel).
SuperMongo Supermongo works fine, however you need to compile and install the version patched for Lion (it fixes a conflict with the getline library). For installation in Mountain Lion, I had to work around a problem with bison.
The source code tarfile can be found in (only IAC users): /net/nas4/inves2/sieinves/invsoft1/sm-latest.tar.gz
To fix the problem with line editing and command recalling, from the SM prompt type termtype xterm.
Non-IAC users must ask the SM authors for a copy of the tarfile.