Installation¶
SpectraFit is available as a Python package and can be installed using various package managers. The recommended Python version is 3.8 or higher.
SpectraFit v1.x lifecycle notice
SpectraFit v2.0 is currently in development. SpectraFit v1.x is in end-of-life maintenance mode and will receive only critical hotfixes.
Quick Install Using UV¶
UV is a fast Python package installer and resolver that we recommend for installing SpectraFit:
Standard Installation Using pip¶
You can install SpectraFit using pip, which is the standard package manager for Python:
Development Installation¶
If you want to contribute to SpectraFit or install the latest development version, you can install directly from the GitHub repository:
# Install using UV (recommended)
uv pip install git+https://github.com/Anselmoo/SpectraFit.git
# Or using pip
pip install git+https://github.com/Anselmoo/SpectraFit.git
For a development setup with all dependencies:
# Clone the repository
git clone https://github.com/Anselmoo/SpectraFit.git
cd SpectraFit
# Install with development dependencies using UV
uv pip install -e ".[dev]"
# Setup pre-commit hooks for development
pre-commit install --install-hooks
Installation with Extra Features¶
SpectraFit supports optional dependencies for additional features:
# Install with all extras
uv pip install "SpectraFit[all]"
# Install with specific extras
uv pip install "SpectraFit[plotting,jupyter]"
Available extras include:
plotting: For enhanced visualization capabilitiesjupyter: For Jupyter notebook integrationdev: For development dependencies (testing, linting, etc.)all: Installs all optional dependencies
Conda Installation¶
If you prefer using conda for managing Python environments, you can create a dedicated environment for SpectraFit:
# Create a new conda environment
conda create -n SpectraFit python=3.10
conda activate SpectraFit
# Install using pip within conda
pip install SpectraFit
Verification¶
After installation, you can verify that SpectraFit is correctly installed by running:
System Requirements¶
- Python: 3.8 or higher
- OS: Windows, macOS, or Linux
- Dependencies: All dependencies will be automatically installed with the package
For more details on dependencies, see the pyproject.toml file in the repository.
Troubleshooting¶
If you encounter any issues during installation:
- Make sure your Python version is 3.8 or higher
- Try upgrading your package manager:
uv pip install --upgrade piporpip install --upgrade pip - For conda environments, ensure conda-forge is in your channels:
conda config --add channels conda-forge - Check the GitHub Issues for known problems
- Report new issues on the GitHub repository