Requirements
LangChain requires Python 3.10 or higher. You can check your Python version:Python versions supported: 3.10, 3.11, 3.12, 3.13, and 3.14
Install LangChain
Core dependencies
When you installlangchain, the following core dependencies are automatically included:
- langchain-core (>=1.2.10) - Base abstractions and interfaces
- langgraph (>=1.0.8) - Agent orchestration framework
- pydantic (>=2.7.4) - Data validation and settings management
Optional integrations
LangChain follows a modular architecture. Install only the integrations you need:Chat models
Chat models
Install specific model provider packages:
Embeddings
Embeddings
Install embedding provider packages:
Vector stores
Vector stores
Install vector store packages:
Text splitters
Text splitters
For document processing and chunking:
Community integrations
Community integrations
For additional community-maintained integrations:
Install with extras
You can install LangChain with optional dependencies using extras:Development setup
For development or contributing to LangChain:Environment variables
Configure API keys for the integrations you’re using:.env
Verify your setup
Create a simple test script to verify everything works:test_setup.py
Next steps
Quickstart
Build your first LLM application
Core concepts
Learn about the framework architecture
Integrations
Explore available providers
Guides
Follow step-by-step guides
Troubleshooting
ImportError: No module named 'langchain'
ImportError: No module named 'langchain'
Make sure you installed LangChain in the correct Python environment:
Version conflicts
Version conflicts
If you encounter dependency conflicts, try creating a fresh virtual environment:
SSL certificate errors
SSL certificate errors
If you encounter SSL errors when installing:
API key not found
API key not found
Ensure your environment variables are set correctly. Check with: