Dependency Installation Guide¶
This guide explains how to install GraphBit with different dependency configurations based on your specific needs and use cases.
Overview¶
GraphBit uses a modular dependency system that allows you to install only the components you need:
- Core dependencies: Essential packages required for basic GraphBit functionality
- Optional dependencies: Additional packages grouped by functionality (vector databases, benchmarking tools, or everything graphbit provides support for)
- Extras groups: Predefined collections of optional dependencies for common use cases
Core Installation (Minimal Dependencies)¶
The core installation includes only the essential dependencies needed for basic GraphBit functionality.
Installation Commands¶
Core Installation Use Cases¶
- Lightweight deployments where you only need basic workflow functionality
- Custom integrations where you'll add your own databases
- Minimal Docker images for production environments
- Development environments where you want to add dependencies incrementally
Optional Dependency Groups (Extras)¶
GraphBit provides several extras groups that bundle related optional dependencies for specific use cases.
Available Extras Groups¶
benchmark
- Benchmarking and Performance Testing¶
Includes comprehensive tools for performance analysis and AI framework comparisons.
What's included: - Visualization: matplotlib
, seaborn
, pandas
, numpy
- Performance monitoring: psutil
, memory-profiler
, tabulate
- AI frameworks: anthropic
, openai
, langchain
, langchain-openai
, langchain-anthropic
, langchain-ollama
, langgraph
, llama-index
, llama-index-llms-anthropic
, llama-index-cli
, crewai
, pydantic-ai
- CLI tools: click
Installation:
Use cases: - Performance benchmarking against other AI frameworks - Analyzing workflow execution metrics - Comparing different LLM providers - Research and development environments
full
- Complete Installation¶
Includes all available optional dependencies for maximum functionality.
What's included: - All dependencies from benchmark
group - All vector database connectors - All AI providers currently supported by GraphBit. - All utility libraries
Installation:
Use cases: - Development environments where you need access to all features - Prototyping with multiple AI providers and databases - Educational or training environments - One-stop installation for comprehensive GraphBit usage
Vector Database Extras¶
chromadb
- ChromaDB Integration¶
Includes: chromadb
Use case: Document similarity search, RAG applications
pinecone
- Pinecone Integration¶
Includes: pinecone
Use case: Managed vector database for production applications
qdrant
- Qdrant Integration¶
Includes: qdrant-client
Use case: Open-source vector database with advanced filtering
weaviate
- Weaviate Integration¶
Includes: weaviate-client
Use case: Knowledge graphs and semantic search
milvus
- Milvus Integration¶
Includes: pymilvus
Use case: Large-scale vector similarity search
faiss
- FAISS Integration¶
Includes: faiss-cpu
, numpy
Use case: High-performance similarity search and clustering
elasticsearch
- Elasticsearch Integration¶
Includes: elasticsearch
Use case: Full-text search with vector capabilities
Database Extras¶
pgvector
- PostgreSQL with pgvector¶
Includes: psycopg2
Use case: PostgreSQL with vector extensions
mariadb
- MariaDB Integration¶
Includes: mariadb
, numpy
Use case: MariaDB with vector capabilities
mongodb
- MongoDB Integration¶
Includes: pymongo
Use case: Document database with vector search
db2
- IBM Db2 Integration¶
Includes: ibm-db
, numpy
Use case: Enterprise IBM Db2 database
Cloud Provider Extras¶
boto3
- Amazon Web Services¶
Includes: boto3
Use case: AWS services integration
astradb
- DataStax Astra DB¶
Includes: astrapy
Use case: Managed Cassandra with vector search
Multiple Extras Installation¶
You can install multiple extras groups simultaneously:
Installation Scenarios by Use Case¶
Scenario 1:¶
Scenario 2: RAG Application Development¶
Scenario 3: Enterprise Production Environment¶
Scenario 4: Research and Benchmarking¶
Scenario 5: Multi-Cloud Development¶
Dependency Comparison Table¶
Extra Group | AI Providers | Vector DBs | Visualization | Performance | Cloud | Size |
---|---|---|---|---|---|---|
Core | ✅ Built-in | ❌ | ❌ | ❌ | ❌ | Minimal |
benchmark | ✅ All + External Frameworks | ❌ | ✅ Full | ✅ Full | ❌ | Large |
chromadb | ❌ | ChromaDB | ❌ | ❌ | ❌ | Small |
pinecone | ❌ | Pinecone | ❌ | ❌ | ❌ | Small |
pgvector | ❌ | PostgreSQL | ❌ | ❌ | ❌ | Small |
boto3 | ❌ | ❌ | ❌ | ❌ | AWS | Small |
full | ✅ All | ✅ All | ✅ Full | ✅ Full | ✅ All | Very Large |
Development vs Production Recommendations¶
Development Environment¶
# Option 1: Start minimal, add as needed
pip install graphbit
pip install "graphbit[chromadb]" # Add vector DB when needed
# Option 2: Full development stack
pip install "graphbit[benchmark]" # Includes AI providers + tools
# Option 3: Complete development environment
pip install "graphbit[full]" # Everything available
# Option 1: Start minimal, add as needed
poetry add graphbit
poetry add "graphbit[chromadb]" # Add vector DB when needed
# Option 2: Full development stack
poetry add "graphbit[benchmark]" # Includes AI providers + tools
# Option 3: Complete development environment
poetry add "graphbit[full]" # Everything available
# Option 1: Start minimal, add as needed
uv add graphbit
uv add "graphbit[chromadb]" # Add vector DB when needed
# Option 2: Full development stack
uv add "graphbit[benchmark]" # Includes AI providers + tools
# Option 3: Complete development environment
uv add "graphbit[full]" # Everything available
Production Environment¶
Troubleshooting Installation Issues¶
Common Issues and Solutions¶
1. Large Installation Size¶
Problem: pip install "graphbit[full]"
downloads too many packages Solution: Use specific extras instead
2. Dependency Conflicts¶
Problem: Version conflicts between optional dependencies Solution: Use virtual environments and specific versions
3. Database Driver Installation Failures¶
Problem: Native database drivers fail to compile Solutions:
PostgreSQL (psycopg2):
IBM Db2:
4. Memory Issues During Installation¶
Problem: Installation runs out of memory Solution: Install dependencies separately
5. Network/Proxy Issues¶
Problem: Cannot download packages from PyPI Solution: Configure pip for proxy/private PyPI
Verification Commands¶
After installation, verify your setup:
from graphbit import init, version, health_check
# Initialize and check system
init()
print(f"GraphBit version: {version()}")
# Check system health
health = health_check()
print(f"System healthy: {health['overall_healthy']}")
Getting Help¶
If you encounter installation issues:
- Check system requirements: Ensure Python 3.10+ and sufficient disk space
- Update pip:
pip install --upgrade pip
- Use virtual environments: Isolate GraphBit dependencies
- Check the Installation Guide for system-specific instructions
- Search GitHub Issues for similar problems
- Create a new issue with:
- Your operating system and Python version
- Complete error message
- Installation command used
- Output of
pip list
andpython --version
Next Steps¶
Once you have GraphBit installed with the appropriate dependencies:
- Basic usage: Follow the Quick Start Tutorial
- Configuration: Set up your API keys and environment
- Examples: Explore use case examples for your specific installation
- Development: See the Contributing Guide for development setup
Choose the installation method that best fits your use case. You can always add more extras later as your needs evolve!