spiceypy 8.1.0


pip install spiceypy

  Latest version

Released: Apr 05, 2026


Meta
Author: Andrew M. annex
Maintainer: Andrew M. annex
Requires Python: >=3.10

Classifiers

Development Status
  • 5 - Production/Stable

Natural Language
  • English

Topic
  • Scientific/Engineering
  • Scientific/Engineering :: Astronomy

Programming Language
  • Python :: 3 :: Only
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3.12
  • Python :: 3.13
  • Python :: 3.14
  • Cython

Operating System
  • MacOS :: MacOS X
  • POSIX :: Linux
  • POSIX :: BSD :: FreeBSD
  • Microsoft :: Windows

SpiceyPy is a Python wrapper for the NAIF C SPICE Toolkit, written using ctypes and Cython.

Continuous Integration

Code Coverage

Docs

Citation

Code Style

Github - Build Status

Codecov - Test Coverage

Readthedocs - Documentation

Citation Information: Journal of Open Source Software

Code Style - Black

Introduction

SpiceyPy is a python wrapper for the SPICE Toolkit. SPICE is an essential tool for scientists and engineers alike in the planetary science field for Solar System Geometry. Please visit the NAIF website for more details about SPICE.

IMPORTANT: The code is provided “as is”, use at your own risk. However, the NAIF now distributes python “lessons” that use SpiceyPy as the python to spice interface.

Citing SpiceyPy

If you are publishing work that uses SpiceyPy, please cite SpiceyPy and the SPICE toolkit.

SpiceyPy can be cited using the JOSS DOI (https://doi.org/10.21105/joss.02050) or with the following:

Annex et al., (2020). SpiceyPy: a Pythonic Wrapper for the SPICE Toolkit. Journal of Open Source Software, 5(46), 2050, https://doi.org/10.21105/joss.02050

Instructions for how to cite the SPICE Toolkit are available on the NAIF website:

https://naif.jpl.nasa.gov/naif/credit.html.

To cite information about SpiceyPy usage statistics, please cite my 2017 and or 2019 abstracts as appropriate below:
  1. 2017 abstract: https://ui.adsabs.harvard.edu/abs/2017LPICo1986.7081A/abstract.

  2. 2019 abstract: https://ui.adsabs.harvard.edu/abs/2019LPICo2151.7043A/abstract.

Installation

PyPI

Conda Forge

PyPI - python package index

Conda - conda-forge feedstock for SpiceyPy

SpiceyPy can be installed using pip by running: pip install spiceypy

Anaconda users should use the conda-forge distribution of SpiceyPy by running:

conda config --add channels conda-forge

conda install spiceypy

or the same commands prefixed by mamba or micromamba or other conda-like system.

If you wish to install spiceypy from source first download or clone the project. Then run python -m build and install the resulting wheel file in dist. To uninstall run pip uninstall spiceypy.

Pyodide wheels can be built using cibuildwheel on a linux (only!) operating system or vm. It helps if a pyoided virtual environment is also used.

uvx cibuildwheel --platform pyodide

Documentation

The SpiceyPy docs are available at: spiceypy.readthedocs.org. The documentation for SpiceyPy is intentionally abridged so as to utilize the excellent documentation provided by the NAIF. Please refer to C and IDL documentation available on the NAIF website for in-depth explanations. Each function docstring has a link to the corresponding C function in the NAIF docs at a minimum. SpiceyPy documentation contains the NAIF authored Lessons for step-by-step tutorials with code examples.

How to Help

Feedback is always welcomed, if you discover that a function is not working as expected, submit an issue detailing how to reproduce the problem. If you utilize SpiceyPy frequently please consider contributing to the project by citing me using the Zenodo DOI above.

Known Working Environments:

SpiceyPy is compatible with modern Linux, Mac, and Windows environments. Since the package is a wrapper, any environment not supported by the NAIF is similarly not supported by SpiceyPy. If you run into issues with your system please submit an issue with details. Please note that support for Python minor versions are generally phased out as newer versions are released.

  • OS: OS X, Linux, Windows, FreeBSD

  • CPU: x64, arm

  • Python 3.10, 3.11, 3.12, 3.13

  • ARM support for Linux-aarch64 & osx-arm64

  • Support for Python 2.7 ended with version 2.3.2 January 2020 *

Acknowledgements

Supported in part through NASA PDART23 80NSSC25K7040 FY24-FY27.

DaRasch wrote spiceminer, which I looked at to get SpiceCells working, thanks!

Wheel compatibility matrix

Platform CPython 3.10 CPython 3.11 CPython 3.12 CPython 3.13 CPython 3.14
macosx_10_13_x86_64
macosx_10_15_x86_64
macosx_10_9_x86_64
macosx_11_0_arm64
manylinux2014_aarch64
manylinux2014_x86_64
manylinux_2_17_aarch64
manylinux_2_17_x86_64
manylinux_2_28_aarch64
manylinux_2_28_x86_64
win_amd64

Files in release

spiceypy-8.1.0-cp310-cp310-macosx_10_9_x86_64.whl (2.0MiB)
spiceypy-8.1.0-cp310-cp310-macosx_11_0_arm64.whl (1.8MiB)
spiceypy-8.1.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (2.1MiB)
spiceypy-8.1.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (2.3MiB)
spiceypy-8.1.0-cp310-cp310-win_amd64.whl (2.0MiB)
spiceypy-8.1.0-cp311-cp311-macosx_10_9_x86_64.whl (2.0MiB)
spiceypy-8.1.0-cp311-cp311-macosx_11_0_arm64.whl (1.8MiB)
spiceypy-8.1.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (2.2MiB)
spiceypy-8.1.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (2.3MiB)
spiceypy-8.1.0-cp311-cp311-win_amd64.whl (2.0MiB)
spiceypy-8.1.0-cp312-cp312-macosx_10_13_x86_64.whl (2.0MiB)
spiceypy-8.1.0-cp312-cp312-macosx_11_0_arm64.whl (1.8MiB)
spiceypy-8.1.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (2.1MiB)
spiceypy-8.1.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (2.2MiB)
spiceypy-8.1.0-cp312-cp312-win_amd64.whl (1.9MiB)
spiceypy-8.1.0-cp313-cp313-macosx_10_13_x86_64.whl (2.0MiB)
spiceypy-8.1.0-cp313-cp313-macosx_11_0_arm64.whl (1.8MiB)
spiceypy-8.1.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (2.1MiB)
spiceypy-8.1.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (2.2MiB)
spiceypy-8.1.0-cp313-cp313-win_amd64.whl (1.9MiB)
spiceypy-8.1.0-cp314-cp314-macosx_10_15_x86_64.whl (2.0MiB)
spiceypy-8.1.0-cp314-cp314-macosx_11_0_arm64.whl (1.8MiB)
spiceypy-8.1.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (2.1MiB)
spiceypy-8.1.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (2.2MiB)
spiceypy-8.1.0-cp314-cp314-win_amd64.whl (2.0MiB)
spiceypy-8.1.0.tar.gz (627.1KiB)
Extras: None
Dependencies:
numpy (>=1.23.5)