Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.


Spectral Python (SPy) Join the chat at

Spectral Python (SPy) is a pure Python module for processing hyperspectral image data (imaging spectroscopy data). It has functions for reading, displaying, manipulating, and classifying hyperspectral imagery. Full details about the package are on the web site.

Installation Instructions

The latest release is always hosted on PyPI, so if you have pip installed, you can install SPy from the command line with

pip install spectral

Packaged distributions are also hosted at PyPI and GitHub so you can download and unpack the latest zip/tarball, then type

python install

To install the latest development version, download or clone the git repository and install as above. No explicit installation is required so you can simply access (or symlink) the spectral module within the source tree.

Unit Tests

To run the suite of unit tests, you must have numpy installed and you must have the sample data files downloaded to the current directory (or one specified by the SPECTRAL_DATA environment variable). To run the unit tests, type

python -m


Using SPy interactively with its visualization capabilities requires IPython and several other packages (depending on the features used). See the web site for details.