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.

Python 2.7+

Python is the core language for SpacePy. Python 3 is strongly recommended; while SpacePy currently supports Python 2.7, this support will be phased out over the course of 2020. See Python 2 End of Support.

Required to install SpacePy.

NumPy 1.10+

NumPy provides the high-performance array data structure used throughout SpacePy. Version 1.10 or later is required.

Required to install SpacePy. f2py is part of NumPy, but is sometimes packaged separately; it is required (at installation time) if irbempy is to be used.

Due to a numpy bug, numpy 1.15.0 is not supported. Use 1.15.1 or later.

On Python 3.9, numpy 1.18 or later is required.

dateutil

If you choose not to install matplotlib, dateutil 1.4 or later is required. (Installing matplotlib will fulfill this dependency.)

C compiler

If you are installing SpacePy from source, a working C compiler is required. (Not necessary for the Windows binary installer.)

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 0.11+

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 1.5.0+

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:

ffnet 0.7+

ffnet is a neural network package, required for LANLstar.

networkx 1.0+

networkx is a requirement for ffnet, and thus LANLstar.

h5py 2.6+

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 2.7+

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.

Warning

Unlike the Python-based dependencies, the CDF library must be installed if pycdf support is needed; it will not be automatically installed.

Fortran compiler

If installing from source, irbempy requires a Fortran compiler. (This is not required for the Windows binary installer). Supported compilers are the GNU compiler gfortran, the older GNU compiler g77, and the Portland Group PGI compiler.

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

coordinates requires irbempy.

Astropy 1.0+

time requires AstroPy if conversion to/from AstroPy Time 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

ffnet

h5py

matplotlib

networkx

SciPy

AstroPy

coordinates

Coords (except Windows binaries)

datamodel

empiricals

irbempy

Entire module (except Windows binaries)

LANLstar

May be required to install ffnet

Entire module

Entire module

omni

Entire module

plot

Entire module

poppy

pybats

All plotting functions:

  • add_body()

  • add_planet()

  • add_pram_bz()

  • quicklook()

  • add_dst_quicklook()

  • add_b_magsphere()

  • add_b_magsphere_legacy()

  • add_body()

  • add_comp_plot()

  • add_contour()

  • add_cont_shell()

  • add_grid_plot()

  • add_pcolor()

  • add_planet()

  • add_plot()

  • add_stream_scatter()

  • add_ae_quicklook()

  • add_contour()

  • add_kp_quicklook()

  • add_orbit_plot()

  • plot_res()

  • plotbox()

  • plot_res()

  • test_asymtote()

  • test_dipole()

pycdf

Entire module

radbelt

seapy

Entire module

time

AstroPy support in Ticktock

toolbox