Skip to main content

Installation

LangChain 1.x ships as a set of small, independently-versioned packages instead of one monolith. Installing langchain alone gets you the orchestration layer — prompts, chains, agents — but no model provider.

warning

Installing langchain alone gives you no provider. You must also install a partner package (langchain-openai, langchain-anthropic, ...) for the model you actually want to call.

Pick your packages

PackageWhat it gives youInstall it when
langchain-coreBase abstractions: Runnable, messages, prompt templatesAlways — pulled in transitively by everything below
langchainChains, agents, orchestration built on langchain-coreYou are writing application logic
langchain-openaiOpenAI / Azure OpenAI chat, embedding, and completion modelsYou call an OpenAI-compatible endpoint
langchain-anthropicAnthropic Claude chat modelsYou call Claude
langchain-communityThird-party integrations without a dedicated partner packageYou need a loader, tool, or store that has no official package

pip

pip install -U langchain langchain-openai

uv

uv add langchain langchain-openai

Swap langchain-openai for whichever provider package you need — langchain-anthropic, langchain-google-genai, and so on follow the same pattern. Pin versions in a lockfile (uv.lock or requirements.txt) once you move past experimentation; LangChain's minor releases do carry breaking changes.

See also