Installation¶
Learn how to install rs_document in your Python environment.
Using pip¶
The simplest way to install rs_document:
Using uv¶
If you're using uv for faster package management:
Verify Installation¶
Check that rs_document is installed correctly:
import rs_document
# Check version
print(rs_document.__version__)
# Create a test document
doc = rs_document.Document(
page_content="Hello, rs_document!",
metadata={"test": "true"}
)
print(doc)
You should see output like:
Requirements¶
- Python: 3.10 or higher
- Platforms: Linux, macOS, Windows (x86_64 and ARM)
Pre-built Wheels¶
rs_document provides pre-built wheels for most platforms:
- Linux: x86_64, aarch64, armv7, i686, s390x, ppc64le
- macOS: x86_64 (Intel), aarch64 (Apple Silicon)
- Windows: x64, x86
If a wheel isn't available for your platform, pip will automatically compile from source (requires Rust toolchain).
Installing from Source¶
If you need to build from source:
Prerequisites¶
- Install Rust: https://rustup.rs
- Install Python development headers
Build¶
pip install maturin
git clone https://github.com/cam-barts/rs_document.git
cd rs_document
maturin develop --release
Troubleshooting¶
"No matching distribution found"¶
Make sure you're using Python 3.10 or higher:
Build Errors¶
If building from source fails:
- Ensure Rust is installed:
rustc --version - Update Rust:
rustup update - Check Python headers are installed (python3-dev on Ubuntu)
Next Steps¶
Now that rs_document is installed, let's create your first document!