Installation¶
Prerequisites¶
Before installing the Quantize package, ensure you have the following prerequisites:
Python 3.8 or higher
uv (Python package manager) or pip
Installing from Source¶
The recommended way to install Quantize is from source:
Clone the repository:
git clone https://github.com/yourusername/quantize.git cd quantize
Create a virtual environment using uv:
uv venvAlternatively, you can use Python’s built-in venv module:
python -m venv .venv
Activate the virtual environment:
On Windows:
.venv\Scripts\activate
On macOS/Linux:
source .venv/bin/activate
Install the package in development mode:
Using uv:
uv pip install -e .
Using pip:
pip install -e .
Automated Setup¶
The repository includes a setup script that automates the installation process:
python setup_venv.py
This script will:
Create a virtual environment using uv
Install the package in development mode
Install test dependencies
Provide instructions for activating the virtual environment
Dependencies¶
Quantize has the following dependencies:
numpy >= 1.20.0
For development, the following additional packages are recommended:
pytest >= 7.0.0
black >= 23.0.0
isort >= 5.0.0
These development dependencies can be installed with:
pip install -e ".[dev]"
Verifying Installation¶
To verify that Quantize is installed correctly, you can run the example script:
python example.py
You should see output demonstrating the quantization process with sample values.