Skip to main content

Installation

This guide covers installing LangGraph and its dependencies for Python projects.

Requirements

LangGraph requires:
  • Python 3.10 or higher
  • Supported Python versions: 3.10, 3.11, 3.12, 3.13
Python 3.9 and earlier are not supported. Please upgrade to Python 3.10 or later.

Installing LangGraph

Choose your preferred package manager:
pip install -U langgraph
The -U flag in pip ensures you get the latest version.

Core Dependencies

When you install LangGraph, the following dependencies are automatically included:
  • langchain-core (>=0.1) - Core LangChain abstractions
  • langgraph-checkpoint (>=2.1.0, <5.0.0) - Checkpointing interfaces
  • langgraph-sdk (>=0.3.0, <0.4.0) - SDK for LangGraph Server API
  • langgraph-prebuilt (>=1.0.8, <1.1.0) - Prebuilt agent components
  • xxhash (>=3.5.0) - Fast hashing for state management
  • pydantic (>=2.7.4) - Data validation and settings management
You don’t need to install these dependencies separately unless you want specific versions.

Optional Dependencies

Depending on your use case, you may want to install additional packages:

Checkpointing Backends

For persistent state storage:
pip install langgraph-checkpoint-sqlite

LangGraph CLI

For local development and deployment:
pip install langgraph-cli
The LangGraph CLI includes tools for developing, testing, and deploying LangGraph applications. It supports Python versions up to 3.13.

LangChain Integrations

While LangGraph works standalone, you may want LangChain for additional integrations:
pip install langchain
For specific integrations:
pip install langchain-openai

Verify Installation

Confirm LangGraph is installed correctly:
import langgraph
print(langgraph.__version__)
You should see the version number (e.g., 1.0.10). Or run a simple test:
from langgraph.graph import StateGraph
from typing_extensions import TypedDict

class State(TypedDict):
    value: int

graph = StateGraph(State)
print("LangGraph is installed correctly!")

Development Installation

For contributing to LangGraph or running from source:
1
Clone the Repository
2
git clone https://github.com/langchain-ai/langgraph.git
cd langgraph/libs/langgraph
3
Install in Editable Mode
4
pip
pip install -e .
uv
uv pip install -e .
5
Install Development Dependencies
6
pip install -e ".[dev]"
7
This installs:
8
  • Testing tools (pytest, pytest-cov, pytest-mock, etc.)
  • Linting tools (mypy, ruff)
  • Development utilities (jupyter)
  • Version Management

    Check Current Version

    pip show langgraph
    

    Upgrade to Latest Version

    pip install --upgrade langgraph
    

    Install Specific Version

    pip install langgraph==1.0.10
    

    Common Installation Issues

    Python Version Mismatch

    If you see errors about Python version:
    # Check your Python version
    python --version
    
    # Use Python 3.10+ explicitly
    python3.10 -m pip install langgraph
    

    Dependency Conflicts

    If you encounter dependency conflicts:
    # Create a fresh virtual environment
    python -m venv langgraph-env
    source langgraph-env/bin/activate  # On Windows: langgraph-env\Scripts\activate
    pip install langgraph
    

    Permission Errors

    On Linux/Mac, if you get permission errors:
    # Use --user flag
    pip install --user langgraph
    
    # Or use a virtual environment (recommended)
    python -m venv venv
    source venv/bin/activate
    pip install langgraph
    

    Virtual Environment Setup

    Always use virtual environments to avoid dependency conflicts.
    # Create virtual environment
    python -m venv myenv
    
    # Activate (Linux/Mac)
    source myenv/bin/activate
    
    # Activate (Windows)
    myenv\Scripts\activate
    
    # Install LangGraph
    pip install langgraph
    

    Docker Installation

    For containerized deployments:
    FROM python:3.11-slim
    
    WORKDIR /app
    
    # Install LangGraph
    RUN pip install --no-cache-dir langgraph
    
    # Copy your application
    COPY . .
    
    CMD ["python", "your_app.py"]
    

    Next Steps

    Now that LangGraph is installed:

    Quickstart

    Build your first LangGraph application

    Core Concepts

    Learn the fundamentals of LangGraph

    API Reference

    Explore the complete API documentation

    Examples

    See real-world implementations

    Additional Resources

    For JavaScript/TypeScript, see the LangGraph.js installation guide.

    Build docs developers (and LLMs) love