This site is the PyEphem home page
Simply scroll down to find:
Download PyEphem for Windows, Linux, or as source code, directly from the Python Package Index.
Ask questions on Stack Overflow, or use our community support tools on GitHub!
>>> 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.lon = '-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
PyEphem provides basic 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.
Version 188.8.131.52 is the most recent release of PyEphem. Consult the change log to see the new features!
The easiest way to install PyEphem on a Linux or Mac OS machine, after making sure that “Python.h” and the other Python header files are installed (which on Ubuntu requires the “python-dev” package), is to use the pip command, like this:
$ pip install pyephem
you can use virtualenv to create a virtual environment,
and then run its
If instead you want to download the Windows installer or even the raw PyEphem source code, you should visit the PyEphem entry at the Python Package Index, or use the links at the top of this page.