NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #3521 most downloaded on PyPI
Compute positions of the planets and stars
Last release 7 months ago
28 Feb 2026
Release timing varies
gaps range from 8 days to 4.0 years
Nearly every release is documented
notes for 19 of 20 stable releases
Nothing withdrawn
no release was ever pulled
18 years old
20 releases · first in 2008
The first release that offers wheels for Python 3.14.
The first release that offers wheels for Python 3.14.
The star database now makes the star ‘Albereo’ also available under its more official spelling ‘Albireo’.
Classes like Sun and Mercury are now defined using plain literal class statements, instead of being built dynamically in a for loop. This should make the classes visible to tools like editors, debuggers, and type checkers.
The Moon’s visual magnitude formula has been upgraded, so its .mag should more closely match other modern estimates of its brightness.
The Moon’s visual magnitude formula has been upgraded, so its .mag should more closely match other modern estimates of its brightness.
Fix: the routines to find risings and settings would on rare occasion run forever (usually for sunrises or sunsets at very high latitude). They now limit their running time and refuse to run forever.
One column per quarter.
Add support for Python 3.13. #278 _
Add support for Python 3.12. #259 _
Add support for Python 3.12. #259
A memory leak has been resolved, that was failing to free the storage for the satellite name (a Python string) and catalog number (a Python integer) w
A memory leak has been resolved, that was failing to free the storage for the satellite name (a Python string) and catalog number (a Python integer) when the satellite object itself was freed.
In previous versions, if you asked for the position of a body (a) whose elliptical or hyperbolic orbit has an eccentricity very close to 1.0 and (b) which is very far from perihelion, then the underlying C library would print a warning Near-parabolic orbit: inaccurate result but let your Python script continue on unawares. Now, no message is printed directly to the screen, and instead a RuntimeError will tell you why PyEphem can’t compute the body’s position. #239
The underlying C library should no longer produce a segmentation fault if given the floating point number NaN as a date. The Python rising and setting logic now also watches out for NaN dates, and raises a ValueError when one is detected. #237
Fixed an inadvertent loss of precision in the routine that computes a date’s hours, minutes, and seconds. It was sometimes returning a small negative
Fixed an inadvertent loss of precision in the routine that computes a date’s hours, minutes, and seconds. It was sometimes returning a small negative number of seconds, which caused Python’s datetime type to complain ValueError: second must be in 0..59.
Users installing from source on Windows are now protected against a possible encoding error as setup.py reads in two text files.
Fixed the new rising and setting routines so they properly detect if a body is always below the horizon and raise a NeverUpError instead of a plain Va
Fixed the new rising and setting routines so they properly detect if a body is always below the horizon and raise a NeverUpError instead of a plain ValueError.
Gave bodies a new ha Hour Angle attribute, since the quantity was computed internally but then discarded.
Renamed the observer attribute temp to temperature, leaving an alias behind to support the old spelling.
The old cities.lookup() function is now officially deprecated. Because of a Google API restriction, it stopped working in 2018.
When you provide PyEphem with a Python datetime that has a time zone attached, PyEphem now detects the time zone and converts the date and time to UTC automatically.
A new search routine had been written and tested to power the transit-rising-setting methods previous_rising(), previous_setting(), next_rising(), and next_setting(). They should no longer be susceptible to getting hung up in a loop. You should also find them substantially faster.
Fixed the constellation() routine so that it uses astrometric, rather than apparent, right ascension and declination. This should make it more accurate along the borders of each constellation.
Fixed how the underlying “libastro” library computes whether a body’s image is deflected by gravity when its light passes close to the Sun. Previously, users would see coordinates jump unexpectedly as the deflection formula turned on and off haphazardly.
Fixed the star positions in the ephem.stars star catalog by adding 8.75 years of proper motion to each star. Previously, each 1991.25 position from the Hipparcos catalog was being incorrectly treated as a 2000.0 position.
A new routine unrefract() lets you compute the real altitude of a body that you observe in the sky at a given apparent altitude.
The old cities.lookup() function is now officially deprecated. Because of a Google API restriction, it stopped working in 2018.
Planetary moon positions are now available through the year 2040 (previously, asking for a position past 2020 returned zeroes).
Planetary moon positions are now available through the year 2040 (previously, asking for a position past 2020 returned zeroes).
The Date object is improved such that the return values of str(d), d.datetime(), and d.tuple() always agree and are always rounded to the nearest microsecond.
Earth satellites offer new orbit parameter attributes. The old names (which are still present, but no longer documented) started awkwardly with underscores, and had inconsistent getters and setters that would change the satellite if you attempted a round trip like sat._inc = sat._inc. The new attributes (see the list in the Quick Reference) have simple names and use the same units when getting and setting.
Updated Pluto’s long-term orbital elements to match the Astronomical Almanac 2020.
Expanded the ∆T table so that it now runs through 2018, with data from the Astronomical Almanac 2020.
The Observer.copy() method is now documented, and (after a user requested it) the class also now works with Python’s copy module.
PyEphem should now be able to compile for pypy3.
Restore PyEphem’s undocumented ability to parse angle strings like '12 34 56' that are only separated with spaces, instead of insisting on '12:34:56'
Restore PyEphem’s undocumented ability to parse angle strings like '12 34 56' that are only separated with spaces, instead of insisting on '12:34:56' for 12 degrees, 34 arcminutes, and 56 arcseconds.
Fix a compile error ‘for’ loop initial declarations are only allowed in C99 mode reported from a user on Oracle Linux.
Fix MANIFEST.in so the .tar.gz source distribution includes all the header files necessary for compilation.
Fix MANIFEST.in so the .tar.gz source distribution includes all the header files necessary for compilation.
Upgraded to the MIT license following Elwood Downey’s generous decision to open-source XEphem’s code.
Upgraded to the MIT license following Elwood Downey’s generous decision to open-source XEphem’s code.
Fix a bug where supplying a string with a decimal degree measurement could send the parser into an infinite loop.
The FixedBody constructor, which accepts no arguments, now correctly raises a TypeError if any are supplied.
Fixed the body copy() method to correctly copy the extra attributes that some bodies have beyond those of a normal body, like the catalog number of an
Fixed the body copy() method to correctly copy the extra attributes that some bodies have beyond those of a normal body, like the catalog number of an Earth satellite. This bug had in some cases caused segmentation faults.
GitHub issue #166: Fixed a memory leak in readdb().
GitHub issue #119: Fixed the Body.copy() method to correctly copy object-specific fields across to the new object, like Saturn ring tilt and Earth satellite catalog number.
The internal star catalog now includes all 57 navigational stars.
Upgraded libastro to 3.7.7.
The internal star catalog now includes all 57 navigational stars.
GitHub issue #63: The rise, culminate, and set returned by next_pass() are now consecutive values for a single pass. Pass singlepass=False to return the original next_rise, next_culminate, next_set even if next_set < next_rise (the satellite is already up).
GitHub issue #141: ephem.delta_t('0') now returns the correct value, instead of misbehaving for that particular input.
The new ephem.cities.lookup() function runs a Google geocoding search and returns an Observer object for the top result.
The new ephem.cities.lookup() function runs a Google geocoding search and returns an Observer object for the top result.
When an Earth satellite position cannot be computed, PyEphem now raises an exception instead of freezing and locking up Python.
Upgraded to the libastro from XEphem 3.7.6, bringing improvements to Earth satellite transit calculations.
GitHub issue #76: Earth satellite velocity is now calculated with greater accuracy.
GitHub issue #64: rising and setting routines are now careful to restore your Observer.date even if they die with an exception.
GitHub issue #56: Earth satellites now raise an exception for dates a year or more from their TLE epoch, because libastro refuses to process old elements and would return nonsense coordinates.
GitHub issue #44: a segmentation fault would eventually kill Python 3 if a script called Body.copy() either directly or via the Standard Library copy.copy() function.
Gave all bodies a .parallactic_angle() method that computes the same angle as the PA column in XEphem itself (GitHub #24).
Gave all bodies a .parallactic_angle() method that computes the same angle as the PA column in XEphem itself (GitHub #24).
Added a .long alias for the .lon longitude attribute on ecliptic and galactic coordinates (GitHub #41).
Combined the Python 2 and Python 3 code bases using the magic of #ifdef and a barrel full of print() parentheses, which should prevent either version from ever falling behind the other again.
Fixed GitHub issues #35, #37, #40.
Upgraded the underlying astronomy library to 3.7.5.
Upgraded the underlying astronomy library to 3.7.5.
Incompatible Change: the transit functions are now symmetric with the rising and setting functions: while they still return the date and time of the event, they do not alter the .date attribute of the Observer which gets passed to them. This brings their behavior into line with the documentation. (Launchpad #861526)
Date('1986-2-9') now means February 9th instead of meaning “the beginning of 1986, minus two months, minus nine days.” (Launchpad #792321)
Earth satellite positions are now computed to six additional digits, in an attempt to eliminate small jumps in position that some users were observing in their figures. (Launchpad #812906)
Coordinate pair creation no longer leaks memory. (Launchpad #798155)
Added a new next_pass() method to Observer that searches for when a satellite next rises, culminates, and sets.
Added a new next_pass() method to Observer that searches for when a satellite next rises, culminates, and sets.
Added a compute_pressure() method to Observer which computes the standard atmospheric pressure at the observer's current elevation. This function now gets called automatically on new city() objects before they are returned to the user.
Corrected the altitude of San Francisco as returned by city().
Improved the copyright message so that two more authors are credited.
Added cmsI and cmsII attributes to Jupiter to provide the central meridian longitude in both System I and System II.
Added cmsI and cmsII attributes to Jupiter to provide the central meridian longitude in both System I and System II.
Bugfix: Saturn was returning the wrong values for its earthward and sunward angle tilt.
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →