Installation¶
Fast LiteLLM can be installed using pip or uv. Prebuilt wheels are available for all major platforms, so Rust is not required for installation.
Requirements¶
- Python 3.8 or higher (3.12 recommended)
- LiteLLM (will be installed automatically if not present)
Installing from PyPI¶
Using uv (Recommended)¶
uv is a fast Python package manager that we recommend:
Using pip¶
Verifying Installation¶
After installation, verify that Rust acceleration is available:
import fast_litellm
if fast_litellm.RUST_ACCELERATION_AVAILABLE:
print("Rust acceleration is available!")
else:
print("Falling back to Python implementations")
You can also run a health check:
import fast_litellm
health = fast_litellm.health_check()
print(f"Status: {health['status']}")
print(f"Components: {health['components']}")
Platform Support¶
Prebuilt wheels are available for:
| Platform | Architecture | Status |
|---|---|---|
| Linux | x86_64 | Supported |
| Linux | aarch64 | Supported |
| macOS | x86_64 | Supported |
| macOS | ARM64 (M1/M2) | Supported |
| Windows | x86_64 | Supported |
Building from Source¶
If you need to build from source (for development or unsupported platforms):
Prerequisites¶
- Python 3.8+
- Rust toolchain (1.70+)
- maturin for building Python extensions
Steps¶
-
Install Rust:
-
Clone the repository:
-
Create a virtual environment:
-
Install maturin and build:
-
Verify the build:
Troubleshooting¶
Import Errors¶
If you encounter import errors:
- Ensure you're using a supported Python version (3.8+)
- Try reinstalling:
pip install --force-reinstall fast-litellm - Check for conflicting packages:
pip list | grep litellm
Rust Extensions Not Loading¶
If RUST_ACCELERATION_AVAILABLE is False:
- Check for any import warnings that may indicate the issue
- Ensure your platform has prebuilt wheels available
- Try building from source following the steps above
Virtual Environment Issues¶
Always use a virtual environment to avoid conflicts:
Next Steps¶
- Quick Start Guide - Start using Fast LiteLLM
- Configuration - Configure advanced options