Installation

astLib requires:

Optional:

Other versions of the software listed above are likely to work.

You can install astLib via pip:

pip install astLib --user

You may also install using the standard setup.py script, e.g., as root:

sudo python setup.py install

Alternatively,

python setup.py install --user

will install astLib under $HOME/.local (on Ubuntu), and in some other default location on Mac.

You can also use the --prefix option, e.g.,

python setup.py install --prefix=$HOME/local

and then add, e.g., $HOME/local/lib/python3.6/site-packages to $PYTHONPATH (adjust the path according to your Python version number).

export PYTHONPATH=$HOME/local/lib/python3.6/site-packages:$PYTHONPATH

Installation on recent versions of macOS (may no longer be relevant)

Some users have reported that the standard method for installing astLib does not work on recent versions of macOS (e.g., Big Sur), due to the default compiler flags. The current workaround for this is to install using:

CFLAGS="-Wno-error=implicit-function-declaration" python setup.py install

Thanks to Michael Cowley and Stefano Covino for helping to resolve this issue.