Install & Compatibility
Where this runs
tested against v0.2026.8.24.0.24.29 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.014s · 150.5MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 6.5s · import 0.014s · 151MB
158MB installed
● package 158MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
IERS_Data_Provider_Mechanism
✓ import astropy_iers_data
This package does not export any direct Python symbols. Its functionality is to provide IERS data files that `astropy.utils.iers` automatically discovers and uses when the package is installed in the environment. The `import` statement itself typically does nothing beyond ensuring the package is on `sys.path`.
This quickstart demonstrates how `astropy` uses the IERS data provided by `astropy-iers-data`. It explicitly tries to use local data by setting `astropy.utils.iers.conf.auto_download = False` and then performs time transformations and accesses Earth Rotation Parameters that rely on these tables. If successful, it confirms the IERS data is being consumed.
import astropy.time as atime
import astropy.units as u
from astropy.utils import iers
import os
# Ensure astropy-iers-data is installed for local data access
# For demonstration, we'll try to prevent online download if possible.
# In a real scenario, you might want auto_download=True for freshest data.
# Temporarily set auto_download to False to ensure bundled data is preferred
# (if astropy-iers-data is installed and current enough).
# If astropy-iers-data is not present or too old, this might fail.
original_auto_download = iers.conf.auto_download
iers.conf.auto_download = False
try:
# Create a Time object that requires IERS data (e.g., UTC to TAI/TT conversion)
t = atime.Time('2023-01-01 00:00:00', scale='utc', format='isot')
# Access a property that triggers IERS data lookup, e.g., TT
# This operation implicitly uses the IERS tables.
tt_time = t.tt
print(f"UTC Time: {t}")
print(f"TT Time (using IERS data): {tt_time}")
# Demonstrate using Earth rotation parameters (requires IERS data)
xp_val = iers.IERS_A.pm_x(t.mjd).to(u.arcsec)
yp_val = iers.IERS_A.pm_y(t.mjd).to(u.arcsec)
print(f"Pole motion x (xp) at {t.iso}: {xp_val}")
print(f"Pole motion y (yp) at {t.iso}: {yp_val}")
print("Successfully accessed IERS data, likely from astropy-iers-data if auto_download was False.")
except Exception as e:
print(f"An error occurred, potentially indicating missing or outdated IERS data: {e}")
finally:
# Restore original auto_download setting
iers.conf.auto_download = original_auto_download
Debug
Known issues
gotchaIf `astropy-iers-data` is installed, `astropy` will prioritize its bundled IERS data over fresh online data unless `astropy.utils.iers.conf.auto_download` is explicitly set to `True`. This can lead to computations using outdated IERS data if the package is not regularly updated.fixRegularly update `astropy-iers-data` (`pip install --upgrade astropy-iers-data`) to get the latest bundled tables, or set `astropy.utils.iers.conf.auto_download = True` to force fetching the freshest online data (requires internet connection).
affects: All versions of `astropy-iers-data` when used with `astropy`.
gotchaThis package provides data for `astropy` and has no standalone functionality or public API. Attempting to import symbols directly from `astropy_iers_data` (other than the implicit module import) will result in an `ImportError` or other unexpected behavior as it's not designed for direct code interaction.fixInteract with IERS data through `astropy.utils.iers` or other `astropy` modules that consume it (e.g., `astropy.time`, `astropy.coordinates`).
affects: All versions.
breakingWhile `astropy-iers-data` is primarily data, older versions might not be compatible with significant changes in `astropy`'s IERS data handling mechanisms or data formats. This could potentially lead to errors or incorrect results during time or coordinate transformations.fixAlways ensure your `astropy-iers-data` package is reasonably current with your `astropy` installation. When upgrading `astropy`, consider upgrading `astropy-iers-data` simultaneously (`pip install --upgrade astropy astropy-iers-data`).
affects: Versions of `astropy-iers-data` significantly older than the `astropy` version in use.
Upgrade
Version history
0.2026.8.24.0.24.29latest on PyPI · released Aug 24, 2026
Audit
Dependencies
astropyrequiredThis package provides data files consumed exclusively by the astropy core library; it has no standalone functionality.