This site is the PyEphem home page

Simply scroll down to find:

Installation Guide
Documentation
Data Sources

Download PyEphem for Windows, Linux, or as source code, directly from the Python Package Index.

PyPI PyEphem page

Python 2.5 Windows installer
Python 2.4 Windows installer
Source code (.tar.gz)

We use Launchpad to host our community support tools and our source code repository.

LaunchPad PyEphem page

Q&A Forum
News Feed
Bug Tracker
Code Repository

>>> import ephem
>>> mars = ephem.Mars()
>>> mars.compute()
>>> print mars.ra, mars.dec
6:05:56.34 23:23:40.0
>>> ephem.constellation(mars)
('Gem', 'Gemini')
>>> boston = ephem.Observer()
>>> boston.lat = '42.37'
>>> boston.long = '-71.03'
>>> mars.compute(boston)
>>> print mars.az, mars.alt
37:55:48.9 -14:23:11.8
>>> boston.next_rising(mars)
2007/10/2 02:31:51
>>> print mars.az
56:52:52.1
>>> boston.next_transit(mars)
2007/10/2 10:07:47
>>> print mars.alt
71:02:16.3

Welcome!

PyEphem provides scientific-grade astronomical computations for the Python programming language. Given a date and location on the Earth’s surface, it can compute the positions of the Sun and Moon, of the planets and their moons, and of any asteroids, comets, or earth satellites whose orbital elements the user can provide. Additional functions are provided to compute the angular separation between two objects in the sky, to determine the constellation in which an object lies, and to find the times at which an object rises, transits, and sets on a particular day.

The numerical routines that lie behind PyEphem are those from the wonderful XEphem astronomy application, whose author, Elwood Downey, generously gave permission for us to use them as the basis for PyEphem.

Installation

Version 3.7.3.2 is the most recent release of PyEphem. Consult the change log to see the new features, including an incompatible change in the way that the rising and settings functions operate!

The easiest way to install PyEphem, if you have the easy_install Python command, is to run:

$ easy_install pyephem

If you choose to create a virtualenv environment and then run its easy_install instead of your system-wide one, then you will not even have to gain administrator rights to your machine before performing the installation.

But if you want to download the Windows installer, the raw .egg archives in which PyEphem is delivered, or the source code, then you should visit the PyEphem entry at the Python Package Index, or use the links at the top of this page.