Software Requirements

Software and Tools required to work with SAS

Table 1 shows the software and tools required to work with SAS 19. Column Version shows the versions used in the build of SAS 19, column Web page includes the URL to get the specific software or tool and column Comments provides specific hints or links to addtional information you should consider to work with the software or tool.

Table 1.- Software and tools required to work with SAS 19
Name Version Web page Comments
X11 Provided by building OS N/a On macOS you need to install Xquartz 2.7.11 regardless of the OS version
Python 3.8.2

Python web site.

Latest version is 3.9.0.

Binaries ready to install for Linux, macOS, Windows, etc.

Detailed description on the SAS 19 Python environment can be found below.

During the installation of SAS 19, the script configure_install checks for a Python version >=3.6. Please disregard this checking and ensure you have Python version 3.8.2 or later, in agreement with the information shown here.

Perl 5.30.1 perlbrew will help you to download and install it.

Detailed description on the SAS 19 Perl environment can be found below


ds9 8.1 or later SAOImage ds9 download site. The tool xpa 2.1.18 (or later), not included with ds9, is required to work with it. Pleasse download it from the same download site and install it together with ds9.
Grace 5.1.25 The Grace web site provides only the source code.

Installation from source code is difficult. However, both CentOS and Ubuntu provide binary packages which are easily installed.

On macOS we recommend to install Qt Grace 0.2.6. Instructions on how to do it are provided below.

Heasoft 6.28 Binaries and source code available from Heasoft web site. Details on how to build Heasoft from source code to be compatible with SAS 19 can be found below.
WCSTools 3.9.5 The WCSTools web site provides only the source code. Easy to build from source code.

Perl environment

Some SAS tasks are Perl scripts, e.g emchain, epchain, omichain, etc. In order to run, they require that a proper Perl be installed in your system and be available through the PATH environment variable.

Before installing SAS 19, please install Perl 5.30.1 using the perlbrew tool. Then, before running the SAS 19 script, define the environment variable SAS_PERL to point to the Perl 5.30.1 binary provided by such installation.

All SAS 19 Perl tasks search for the perl binary using /usr/bin/env in the first line of the script (she-bang). The SAS installation script configure_install ensures that all SAS 19 Perl task's she-bangs use this mechanism to find in PATH, the right perl binary.

Given that Heasoft includes also Perl tasks, please ensure that the installation of this software, either from source code or from pre-built binaries, uses the same Perl 5.30.1 used for SAS 19. That is accomplished by defining the PERL environment variable to point to such binary, before building or installing Heasoft.

The following Perl modules are also required:


The installation of these modules can be done using the CPAN module included with perl 5.30.1, as follows

perl -MCPAN -eshell

where perl should be the same binary used to work with SAS 19.

The SAS 19 initialisation scripts created during the installation take care of the proper initialization of the standard Perl environment variables PERL5LIB and PERLLIB.

Python requirements

Besides Python 3.8.2 or later, the following Python packages are required to work with SAS 19

  • astropy
  • numpy
  • matplotlib
  • requests
  • pyds9
  • PyQt5
  • beautifultable
  • astroquery
  • scipy
  • notebook

All these packages can be installed by means of pip, the Python package installer, one by one or at once by means of file sas_19_python_packages.txt, which is included in the SAS 19 root installation directory. To perform the installation of all these packages, you can use the following command

pip install -r sas_19.0.0_python_packages.txt

Before doing it, please ensure that Python 3.8.2 (or later) is available through the PATH.

At difference with Perl, for Python it is not necessary to define a SAS_PYTHON environment variable. However, like perl, python must be available through the PATH, to be used from any SAS 19 Python task's she-bang.

SAS initialisation scripts created during installation take care of the proper definition of the standard Python environment variable PYTHONPATH.

We do not recommend installing neither Python nor the required Python packages listed earlier using the conda package manager or any of its similar alternatives, i.e. miniconda, anaconda, etc. We recommend using pip, the Python package installer. The conda package manager, although very good tool to handle any required Python packages and its dependents, it installs as well many other software components to make work Python in any Operating System, some times with unpredictable consequences.

Make a build of Heasoft from source code compatible with SAS 19

Although a binary installation of Heasoft is sufficient to work with SAS, if you build it from source code --e.g. because you want to compile new Xspec models-- to make such build fully compatible with SAS 19, please do not forget to define both, the PERL and the PYTHON environment variables, to point to the Perl 5.30.1 and the Python 3.8.2 (or later) binaries used to work with SAS 19.

Installing QtGrace on macOS

The installation of Grace from source code on macOS can be done using different software tools. Good examples are Macports and homebrew. However, we have found that Qt Grace 0.2.6 binaries provide an excellent and easy alternative to these methods.

Once downloaded from the web site indicated in Table 1, please install the dmg package as usual on macOS. The will be available as an standrad application in the /Applications folder. However, SAS is not prepared to work with it but with something named xmgrace, available from the command line. But you can create the xmgrace command line application by executing the following commands from a standard terminal:

cd /Applications/

sudo ln -s qtgrace xmgrace

To complete the installation you must add the /Applications/ directory to your PATH.

Qt Grace is not an X11 application, therefore you will not get its GUI when run it remotely through ssh.