Python Backend Installation¶
Option A — Install from PyPI¶
# 1. Create and activate a virtual environment
uv venv venv-3.13 --python 3.13
venv-3.13\Scripts\Activate # Windows
source venv-3.13/bin/activate # Linux/macOS
# 2. Install flexible-graphrag
uv pip install flexible-graphrag
# 3. Optional: ArcadeDB embedded mode
uv pip install arcadedb>=26.3.2
# 3a. Optional: LangChain support
uv pip install "flexible-graphrag[langchain]"
# 4. Create .env from sample
copy env-sample.txt .env # Windows
cp env-sample.txt .env # Linux/macOS
# Edit .env with your LLM API keys and database settings
# 5. Start databases
docker compose -f docker/docker-compose.yml up -d
# 6. Start the backend
flexible-graphrag
Option B — Install from source (editable)¶
cd flexible-graphrag
uv venv venv-3.13 --python 3.13
venv-3.13\Scripts\Activate # Windows
source venv-3.13/bin/activate # Linux/macOS
uv pip install -e .
# Optional extras
uv pip install -e ".[langchain]"
uv pip install --override extras-overrides.txt -e ".[langchain,langchain-extras]"
# see flexible-graphrag/pyproject.toml for all options
# arcadedb embedded
uv pip install arcadedb-embedded>=26.3.2
cp env-sample.txt .env # Linux/macOS
copy env-sample.txt .env # Windows
# Start the backend
flexible-graphrag
# or: uv run start.py
The backend will be available at http://localhost:8000.
Windows Build Tools
Several dependencies (spacy, lancedb, psycopg2, and some database drivers) include C extensions that must be compiled on Windows. When running on Windows, uv pip install may need to build a platform-specific wheel if a pre-built one is not available for your Python version. If installation fails with "Microsoft Visual C++ 14.0 or greater is required", install Microsoft C++ Build Tools and select "Desktop development with C++".