Updated Jan 19, 2021! Still in progress because I’m struggling to ‘make install’!
Here are my instructions for how to get HEAsoft, the NASA High Energy Astrophysics Software, set up on a Mac with macOS Catalina (v10.15.7). I learned most of this from HEAsoft’s own documentation (and a lot of trial and error over the years). I work in bash, so adapt as needed if you use c-shell or zsh. Disclaimer: I’m not a HEAsoft developer or maintainer, so follow this advice at your own risk. Actual HEAsoft maintainers should be your first point of contact if something goes wrong.
Make a full backup of your machine as-is.
Install these things:
Using the package manager, install the following (and their dependencies):
Download the HEAsoft source tarball. The first bullet point, above Step 1 on that page, should have everything you need (and you probably don’t need the extra old XSPEC stuff). This download takes like 30 minutes! I then sudo-make the directory
/usr/local/src and sudo-unzip the HEAsoft tarball in there (
Follow the instructions for remote CALDB: https://heasarc.gsfc.nasa.gov/docs/heasarc/caldb/caldb_remote_access.html. Remember to save the files in
/usr/local/src and put the appropriate export lines in
~/.bashrc (using homebrew installations of the compilers and the anaconda distribution of python 3):
/opt/X11 is a real place where X11 lives. For example, if
cd /opt/X11 takes you somewhere and has contents like
lib (among others), you’re probably good to go.
To configure, make, and install (Note: your HEAsoft version number might be different when you reference this blog post):
./configure –x-libraries=/opt/X11/lib –x-includes=/opt/X11/include >& config.out
make > build.log 2>&1
make install > install.log 2>&1
You should be able to open
install.log as those things are going (from a different terminal window) to see their progress. The
make line with
build.log takes a particularly long amount of time (like 20ish minutes).
~/.bashrc for general use (again, your HEAsoft version number and system architecture might be different. If you
ls in the HEAsoft directory you’ll see what to put for the system architecture thing):
alias heainit=”. $HEADAS/headas-init.sh”
To start up XSPEC, in a bash terminal session type
and it should start up an XSPEC environment! Happy analysis!
Once I install HEASoft properly and get PyXSPEC working, I’ll put the steps here.