Optional Dependencies

Warning

Make sure your base installation is working before adding optional dependencies.

Overview

SpectroChemPy can be extended with optional dependencies for specific functionality. Missing dependencies will only raise an ImportError when the specific feature is used.

Examples and Testing Data

Note

Example data is not included in the main package to reduce installation size.

Installation options:

mamba install -c spectrocat spectrochempy_data

Optional Plugins

SpectroChemPy includes several optional plugins that extend its capabilities for specific domains. Install them as needed:

pip install spectrochempy[iris]      # 2D-IRIS analysis
pip install spectrochempy[nmr]       # Bruker TopSpin reader & NMR processing
pip install spectrochempy[tensor]    # TensorLy-backed tensor decompositions
pip install spectrochempy-carroucell  # Carroucell experiment reader

Each plugin is independently versioned and maintained. Missing plugins raise a clear MissingPluginError with installation instructions when the corresponding feature is accessed.

Note

Development builds

Conda development builds are available for the core package, but official plugin development builds are not currently uploaded automatically. Stable plugin packages are published on the main spectrocat channel. For plugin development, install the plugin from a local source checkout as shown above.

See also

Plugins for more details on the plugin system.

Cantera (experimental)

Warning

The spectrochempy-cantera plugin is experimental and not officially supported. It is not included in aggregate extras and must be installed manually:

pip install spectrochempy-cantera

See Experimental plugins for details.

For users who still need the Cantera library outside of SpectroChemPy, it can be installed separately:

mamba install -c cantera cantera

GUI Support

Qt Backend

For interactive matplotlib plots:

mamba install "pyqt>=5.15.0"

Usage in Jupyter:

%matplotlib qt

Note

Qt backend is recommended for detailed plot manipulation and better interactivity.

Troubleshooting

If you encounter issues:

  1. Verify base installation: python -c "import spectrochempy"

  2. Check dependency versions: mamba list / pip list

  3. Update all packages: mamba update --all / pip install --upgrade spectrochempy

  4. See Getting Help for support