Sphinx logo

Installing Astropysics

Requirements

Before you do anything with astropysics, you’ll need:

  • Python 2.5 or higher (2.6 highly recommended), although 3.x is not yet supported.
  • numpy
  • scipy

Follow the instructions on those sites, or, far easier, install them as packages from your operating system (e.g. apt-get or the synaptic GUI on Ubuntu, Macports on OS X, etc.).

Install

Once you have the requirements satisfied, you have a few options for installing astropysics.

Note

On most unix-like systems, you will need to either execute these commands as the root user, or preface them with sudo.

If you have pip (the new, better easy installer) or easy_install/setuptools (you should probably install pip...), just run either:

pip install astropysics

or:

easy_install astropysics

If you are installing from source code, instead, just do:

python setup.py install

If you plan on using the most up-to-date version of astropysics or if you wish to alter the source code (see Developer Guidelines for Astropysics), a useful way to immediately see changes without having to re-install every time is to use the command:

python setup.py develop

Setup

After the package has been installed, at the command line, run:

astpys-setup

This script does two things:

  • Prompts you to select which optional packages you want to download and install.
  • Configures IPython to support the ipyastpys script (described in Getting Started/Tutorial).

The first of these involves an interactive process that downloads and installed requested packages. To install all of them, type a (and hit enter), otherwise choose a number to install that package. If you want to quit before installing all of the package (for example, if some don’t install correctly), choose q. For information on a package, type i# (where # is the number for the package).

Note that if you can’t get any packages to install, you might try running the script as:

astpys-setup -s

Depending on your operating system, you may want to use your package management system to install the recommended packages, before running the setup (although you may need the more up-to-date versions given here).

Table Of Contents

Previous topic

Astropysics: astrophysics utilities for python

Next topic

Getting Started/Tutorial

This Page