Installation Guide¶
This guide covers all methods of installing BoxLab, from simple pip installation to development setup.
Prerequisites¶
BoxLab requires Python 3.10 or higher. Check your Python version:
Installation Methods¶
Option 1: Install from PyPI (Recommended)¶
The simplest way to install BoxLab for end users:
Verify installation:
Option 2: Install from Source¶
For the latest development version or to contribute:
Using Poetry (Recommended for Development)¶
- Install Poetry (if not already installed):
- Clone the repository:
- Install dependencies:
# Basic installation
poetry install
# With development tools
poetry install --extras dev
# With testing tools
poetry install --extras test
- Activate the virtual environment:
poetry shell # Need to install shell plugin. See https://python-poetry.org/docs/managing-environments/#activating-the-environment
- Verify installation:
Using pip¶
- Clone the repository:
- Install in editable mode:
# Basic installation
pip install -e .
# With development tools
pip install -e ".[dev]"
# With testing tools
pip install -e ".[test]"
# With all extras
pip install -e ".[dev,test]"
- Verify installation:
Optional Dependencies¶
PyTorch Integration¶
For PyTorch integration and training workflows:
# Install PyTorch (CPU)
pip install torch torchvision
# Install PyTorch (GPU - CUDA 11.8)
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu118
# Install PyTorch (GPU - CUDA 12.1)
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu121
After installing PyTorch, you can use the PyTorch adapter:
GUI Dependencies¶
The annotator GUI requires additional packages (usually installed automatically):
Development Setup¶
For contributors and developers:
1. Install Development Tools¶
This installs:
- mkdocs - Documentation generation
- mkdocs-material - Documentation theme
- mkdocstrings - API documentation
- pre-commit - Git hooks
- ruff - Linting and formatting
2. Install Testing Tools¶
This installs:
- pytest - Testing framework
- pytest-cov - Coverage reporting
- mypy - Type checking
- pylint - Code analysis
3. Setup Pre-commit Hooks¶
4. Run Tests¶
# Using Poetry
poetry run pytest
# Using pip
pytest
# With coverage
pytest --cov=boxlab --cov-report=html
5. Build Documentation¶
Visit http://127.0.0.1:8000 to view documentation.
Running BoxLab¶
After installation, you can run BoxLab in multiple ways:
As a Command¶
As a Python Module¶
In Python Scripts¶
Troubleshooting¶
Command Not Found¶
If boxlab command is not found after installation:
- Check if it's in PATH:
- Use full path (if installed with pip):
- Reinstall with pip:
Import Errors¶
If you get import errors:
- Verify installation:
- Check Python version:
- Reinstall dependencies:
Poetry Issues¶
If Poetry gives errors:
- Update Poetry:
- Clear cache:
- Remove lock file and reinstall:
Upgrading¶
Upgrade from PyPI¶
Upgrade from Source¶
Uninstallation¶
Uninstall with pip¶
Uninstall with Poetry¶
System Requirements¶
Minimum Requirements¶
- Python 3.10+
- 2GB RAM
- 500MB disk space
Recommended Requirements¶
- Python 3.11+
- 4GB+ RAM
- 1GB+ disk space
- GPU (for PyTorch training)
Supported Platforms¶
- Linux (Ubuntu 20.04+, Debian 10+, CentOS 7+)
- macOS (10.15+)
- Windows (10+)
Next Steps¶
- Quick Start Guide - Get started with BoxLab
- CLI Overview - Learn the command-line interface
Getting Help¶
- Documentation: Full documentation
- GitHub Issues: Report problems
- Discussions: Ask questions