APLpy requires the following packages to function correctly:
In addition, the following optional packages enhance the functionality of APLpy:
- pyregion (which in turns requires pyparsing)
- montage-wrapper and Montage (the first is a Python wrapper to the second)
To start with, you will need a typical Scientific Python installation containing Numpy and Matplotlib. There are a number of ways to get set up with this, but if don't previously have any Python installation and just want to get set up fast, and don't have an existing Python installation, you can use the Anaconda Python distribution, which includes Numpy, Matplotlib, and Astropy. Make sure you set up your $PATH environment variable as instructed at the end of the installation process.
pip install aplpy
If you get a ``permission denied`` error, add the --user option:
pip install aplpy --user
If you don't have pip installed, you can either first install it and proceed as shown above, or you can just download the APLpy tar file from PyPI and do:
tar xvzf APLpy-x.x.x.tar.gz
python setup.py install
You can also install the optional dependencies with
pip install pyregion
pip install pyavm
pip install montage-wrapper
The last one will only succeed if you have already installed the Montage standalone package.
If you are using a Mac and rely on MacPorts to manage your Python installation (see here) then you should be able to do:
sudo port install py27-aplpy
(this is for Python 2.7 - adjust the Python version number as needed)
Currently, one of the features in APLpy (re-projecting a FITS file to point
north) requires Montage to be
installed. Montage is a set of tools developed at the Infrared Processing and
Analysis Center (IPAC) to re-project and mosaic FITS files. If you do wish to
north argument when initializing a
FITSFigure instance, you will need to install Montage.
Installation instructions are available on the Montage website.