Astropy has the following strict requirements:
Astropy also depends on other projects for optional features.
TODO: Link to the planned dependency checker/installer tool.
TODO: Write once we’re up on PyPI.
TODO: Write about where to obtain binary packages (.dmg, .msi etc.)
You will need a compiler suite and the development headers for Python and Numpy in order to build Astropy. Using the package manager for your platform will usually be the easiest route.
The instructions for building Numpy from source are also a good resource for setting up your environment to build Python packages.
Source tarballs of past releases and the current development branch of astropy can be downloaded from here:
The latest development version of Astropy can be cloned from github using this command:
git clone git://github.com/astropy/astropy.git
Note
If you wish to participate in the development of Astropy, see Documentation for Developers. This document covers only the basics necessary to install Astropy.
Astropy uses the Python distutils framework for building and installing.
To build Astropy (from the root of the source tree):
python setup.py build
To install Astropy (from the root of the source tree):
python setup.py install
Building the documentation requires the Astropy source code and some additional packages:
There are two ways to build the Astropy documentation. The most straightforward way is to execute the command (from the astropy source directory):
python setup.py build_sphinx
The documentation will be built in the docs/_build/html directory, and can be read by pointing a web browser to docs/_build/html/index.html.
The above method builds the API documentation from the source code. Alternatively, you can do:
cd docs
make html
And the documentation will be generated in the same location, but using the installed version of Astropy.
The easiest way to test that your Astropy built correctly is to run (from the root of the source tree):
python setup.py test
There are also alternative methods of Running Tests.