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

Pre-release (dev) versions of plugins are published to the dev label on Anaconda.org. To install the latest development build:

mamba install -c spectrocat/label/dev -c conda-forge spectrochempy-nmr

Dev builds may depend on the latest dev core package, so include the dev channel for core as well:

mamba install -c spectrocat/label/dev -c conda-forge spectrochempy

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