Getting started

Requirements

poliastro requires the following Python packages:

  • NumPy, for basic numerical routines
  • Astropy, for physical units and time handling
  • numba (optional), for accelerating the code
  • jplephem, for the planetary ephemerides using SPICE kernels
  • matplotlib, for orbit plotting
  • scipy, for root finding and numerical propagation

poliastro is usually tested on Linux, Windows and OS X on Python 2.7, 3.3, 3.4 and 3.5, using NumPy 1.9 and 1.10 (single codebase).

Installation

The easiest and fastest way to get the package up and running is to install poliastro using conda:

$ conda install poliastro --channel poliastro

You can also install poliastro from PyPI using pip, given that you already have all the requirements:

$ pip install poliastro

You can also download poliastro source from GitHub and type:

$ python setup.py install

Development installations are also supported thanks to setuptools:

$ python setup.py develop

Warning

It is recommended that you never ever use sudo with distutils, pip, setuptools and friends in Linux because you might seriously break your system [1][2][3][4]. Options are per user directories, virtualenv or local installations.

Testing

If installed correctly, the tests can be run using py.test:

$ python -c "import poliastro; poliastro.test()"
Running unit tests for poliastro
[...]
OK
$

If for some reason any test fails, please report it in the issue tracker.