Installation

Installation#

Install#

pip install spm1d

Example datasets from jiku-data can be optionally installed using:

pip install "spm1d[data]"

Installing the data is necessary only if you wish to run all examples in this documentation.

Verify#

import spm1d
print( spm1d.__version__ )
0.5.0

If import spm1d executes without errors then it has been successfully installed.

Verify that print( spm1d.__version__ ) prints the latest version: 0.5.0 .


Requirements#

Python 3.10 or newer

  • numpy — numpy’s linear algebra library used extensively in spm1d statistics calculations

  • scipy — miscellaneous statistics and linear algebra functions

  • matplotlib — plotting and visualizations

  • rft1d — random field theory probability calculations for one-dimensional continua

  • h5py — saving and loading spm1d results in HDF5 format

  • formulaic — parsing model formulas such as "y ~ A + B"


Downgrade#

You can downgrade to the most recent 0.4 version using:

pip install "spm1d<0.5"

or you can install a specific previous version ℹ️ using, for example:

pip install "spm1d==0.4.56"
ℹ️ Previous versions
  • For spm1d versions earlier than 0.4: only bug support is available

  • Running version 0.4 scripts run under 0.5 may require changes (see migrating from 0.4).