Some additional steps beyond the standard installation instructions may be required for certain macOS systems.
The steps detailed in this document were last tested for macOS 10.14.2.
The following packages are required in order to build PySAP:
cmake
libomp
(orgcc
*)
*Any c/c++ compiler that supports OpenMP should work. (Note that the native macOS
clang
does not provide OpenMP support on its own)
An essential first step for any developer working on macOS is to install the command line tools. This can be done as follows
xcode-select --install
The above listed requirements can be readily installed on macOS using Homebrew.
brew install cmake libomp
Note that if you install gcc
the commands gcc
and g++
default to clang
.
Therefore, before installing PySAP, you should export the environment variables CC
and CXX
.
e.g.
export CC="/usr/local/bin/gcc-8"
export CXX="/usr/local/bin/g++-8"
If you encounter problems re-compiling PySAP following an OS update it may be necessary to uninstall Homebrew and repeat these steps.
The following subsections propose solutions to some known issues.
Some issues may arise at runtime with regards to the installation of pyqtgraph
. The
easiest solution to this problem is to install the package using Anaconda.
conda install pyqtgraph
Alternatively reinstall PyQT5.
pip install -I pyqt5
See the PyQtGraph homepage for further help.
If you see the following error or something similar
**RuntimeError**: Python is not installed as a framework...
simply create a matplotlibrc
file and specify a backend.
e.g.
echo "backend: Agg" >> ~/.matplotlib/matplotlibrc
If you encounter this error
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
make[2]: *** [cfitsio/src/cfitsio-stamp/cfitsio-configure] Error 1
make[1]: *** [CMakeFiles/cfitsio.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
It may be necessary to install the macOS SDK headers. This can be done as follows
cd /Library/Developer/CommandLineTools/Packages/
open macOS_SDK_headers_for_macOS_10.14.pkg