SpacePy Dependencies

SpacePy relies on several other pieces of software for complete functionality. Installing SpacePy links to details on installing the required software for each platform.

Unless otherwise noted, a dependency may be installed after SpacePy, and the new functionality will be available the next time SpacePy is imported.

Currently required versions are documented here. Dependency version support describes future support.

Hard Dependencies

Without these packages installed, SpacePy will not function. Installing via pip will normally install Python-based dependencies automatically.

Python 3.7+

Python is the core language for SpacePy.

Required to install SpacePy.

NumPy 1.15.1+

NumPy provides the high-performance array data structure used throughout SpacePy. Version 1.15.1 or later is required. Due to a numpy bug, numpy 1.15.0 is not supported.

On Python 3.9, numpy 1.18 or later is required.

dateutil 2.5+

dateutil 2.5 or later is required.

C compiler

If you are installing SpacePy from source, a working C compiler is required. (Not necessary for binary wheels, provided on most platforms.)

pip

pip is now the expected installer for Python packages. Almost any modern Python installation will include it.

setuptools

setuptools is the installer backend. It is commonly included and, if necessary, installable with pip.

Soft Dependencies

Without these packages, SpacePy will install, but certain features may not be available. Usually an ImportError means a dependency is missing.

These are simply marked as dependencies in SpacePy metadata and thus will be automatically installed when using dependency-resolving methods such as pip.

SciPy 1.0+

SciPy provides several useful scientific and numerical functions build on top of NumPy. It is highly recommended. The following modules may have limited functionality without SciPy:

matplotlib 3.1+

matplotlib is the preferred plotting package for Python. It is highly recommended. Without it, you will not be able to effectively visualize data, and the following modules may have limited functionality or fail entirely:

h5py 2.10+

h5py provides a Python interface to HDF5 files. It is required for the HDF import/export capability of datamodel and for use of the omni module.

CDF 3.5+

NASA’s CDF library provides access to Common Data Format files. It is required for pycdf, and thus for the CDF import/export capability of datamodel. The library is included with SpacePy binary wheels, but a locally-installed library will be used instead if it is found.

Warning

If building SpacePy from source, the CDF library must be installed if pycdf support is needed. It can be installed after SpacePy.

Fortran compiler

If installing from source, irbempy requires a Fortran compiler. This is not required if using a binary wheel. The supported compiler is the GNU compiler gfortran.

If irbempy is to be used, the Fortran compiler (and f2py) must be installed before SpacePy.

coordinates requires irbempy to use the IRBEM-based backend, but the new CTrans-based backend can be used without Fortran. See the coordinates documentation for the use_irbem option.

Astropy 2.0+

time requires Astropy if conversion to/from Astropy Time is desired.

coordinates requires Astropy if conversion to/from Astropy SkyCoord is desired.

Because Astropy is only required for these conversions, it is not automatically installed with SpacePy.

Pandas 0.18+

Pandas is only required if converting from SpaceData to DataFrame is desired.

Soft Dependency Summary

The following table summarizes, by SpacePy module, the functionality that is lost if a soft dependency is not installed. If there is nothing for a given dependency/module combination, the module is unaffected by that dependency.

SpacePy functionality lost without soft dependencies

CDF

Fortran compiler

h5py

matplotlib

SciPy

AstroPy

Pandas

coordinates

Coords IRBEM backend (except binaries)

Entire module

ctrans

Entire module

datamodel

toDataFrame

empiricals

irbempy

Entire module (except binaries)

LANLstar

omni

Entire module

plot

Entire module

poppy

pybats

All plotting functions:

pycdf

Entire module (except binaries)

seapy

Entire module

time

AstroPy support in Ticktock

toolbox