System requirements
Python version
Python 3.11, 3.12, or 3.13Check your version:
python --versionLLM provider
OpenAI API key, Azure OpenAI endpoint, or any LiteLLM-supported provider
GraphRAG uses LiteLLM under the hood, which supports 100+ LLM providers including OpenAI, Azure, Anthropic, Cohere, and more.
Installation methods
Install from PyPI (recommended)
The easiest way to install GraphRAG is via pip from the Python Package Index:Install in a virtual environment
Using a virtual environment is the best practice for Python projects:Install from source
For development or to use the latest features from the main branch:Core dependencies
GraphRAG automatically installs these core dependencies:Language models and AI
Language models and AI
graphrag-llm- LLM integration layerazure-identity- Azure authenticationjson-repair- JSON parsing and repairnltk- Natural language processingspacy- Advanced NLP capabilitiestextblob- Text processing
Graph and vector operations
Graph and vector operations
graphrag-vectors- Vector storage and searchgraspologic-native- Graph analyticsnetworkx- Graph data structuresgraphrag-chunking- Text chunking algorithms
Data and storage
Data and storage
graphrag-storage- Storage abstractionsgraphrag-cache- LLM caching layerazure-storage-blob- Azure Blob storageazure-search-documents- Azure AI Searchpandas- Data manipulationpyarrow- Parquet file supportnumpy- Numerical computing
CLI and utilities
CLI and utilities
typer- Command-line interfacepydantic- Data validationtqdm- Progress barsdevtools- Development utilities
Verify installation
After installation, verify that GraphRAG is correctly installed:init- Initialize a new GraphRAG workspaceindex- Run the indexing pipelinequery- Query your indexed dataupdate- Update an existing indexprompt-tune- Auto-tune prompts for your data
Provider-specific setup
OpenAI
For OpenAI, you only need an API key:- Get your API key from platform.openai.com
- After running
graphrag init, add it to your.envfile:
.env
- Your
settings.yamlwill use OpenAI by default:
settings.yaml
Azure OpenAI
For Azure OpenAI, you need additional configuration:-
Get your credentials from the Azure Portal:
- API key
- Endpoint URL (e.g.,
https://your-resource.openai.azure.com) - Deployment names for your models
- API version (e.g.,
2024-02-15-preview)
-
Add your API key to
.env:
.env
- Update
settings.yamlwith Azure-specific settings:
settings.yaml
Azure managed identity
For managed identity authentication (no API key needed):settings.yaml
Other providers (via LiteLLM)
GraphRAG supports any provider that LiteLLM supports. Examples:Optional dependencies
Vector stores
GraphRAG includes LanceDB by default. For other vector stores:Storage backends
Additional storage options are available:Platform-specific considerations
Linux/Unix
No special considerations. Standard pip installation works:macOS
For Apple Silicon (M1/M2) Macs, all dependencies are compatible:Windows
Windows users may need Visual C++ build tools for some native dependencies:- Download and install Microsoft C++ Build Tools
- Then install GraphRAG:
Docker installation
While there’s no official Docker image, you can create your own:Dockerfile
Upgrading GraphRAG
Upgrade to latest version
Check for updates
Migration between major versions
For major version updates (e.g., 2.x to 3.x):- Read the breaking changes document
- Backup your existing configuration and data
- Use the provided migration notebooks if available to avoid re-indexing
- Update your settings.yaml to the new format
- Re-run initialization:
graphrag init --force
Troubleshooting installation
pip install fails with build errors
pip install fails with build errors
This usually indicates missing build tools:macOS:Linux (Debian/Ubuntu):Windows:
Install Microsoft C++ Build Tools
Command not found: graphrag
Command not found: graphrag
The GraphRAG CLI may not be in your PATH:
- Ensure your virtual environment is activated
- Try using the full path:
python -m graphrag --help - On Windows, you may need to use
python -m graphraginstead ofgraphrag
Import errors after installation
Import errors after installation
This can happen with dependency conflicts:
- Create a fresh virtual environment
- Uninstall and reinstall GraphRAG:
- Check for conflicting packages:
pip check
SSL certificate errors
SSL certificate errors
If you encounter SSL errors during installation:For corporate networks behind proxies, configure pip:
Next steps
Once GraphRAG is installed:Quickstart
Follow our quickstart guide to index your first document and run queries.
Configuration
Learn about initialization and configuration options.
CLI reference
Explore all available command-line options.
Development
Set up a development environment to contribute to GraphRAG.
Getting help
If you encounter issues during installation:- Check GitHub Issues for known problems
- Ask questions in GitHub Discussions
- Review the contributing guide