Installation & Setup
Prerequisites
- Python 3.8 or higher
- pip (Python package installer)
- NumPy
- SciPy
- pandas (optional, for data handling)
Installation
From PyPI (Recommended)
The easiest way to install pybocd is via pip:
pip install pybocd
From Source
For development or to get the latest features:
git clone https://github.com/Zeyu-Xie/pybocd.git
cd pybocd
pip install -e .
Ensure you have the build dependencies:
pip install hatchling
Verification
Verify the installation by importing the package:
import pybocd
from pybocd import BOCDNIG, BOCDGMM
print(pybocd.__version__)
Troubleshooting
Import Errors
If you encounter import errors, ensure all dependencies are installed:
pip install --upgrade numpy scipy pandas
Version Conflicts
If you have multiple Python versions installed, specify the version explicitly:
python3.10 -m pip install pybocd
Development Installation Issues
If installing from source fails, ensure you have the development headers:
- Ubuntu/Debian:
sudo apt-get install python3-dev - macOS: Xcode command line tools (
xcode-select --install) - Windows: Visual Studio Build Tools