langchain-dependencies

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
<overview> The LangChain ecosystem is split into focused, independently-versioned packages. Understanding which packages you need — and their version constraints — prevents incompatibilities and keeps upgrades predictable.
Key principles:
  • LangChain 1.0 is the current LTS release. Always start new projects on 1.0+. LangChain 0.3 is legacy maintenance-only — do not use it for new work.
  • langchain-core is the shared foundation: always install it explicitly alongside any other package.
  • langchain-community (Python only) does NOT follow semantic versioning; pin it conservatively.
  • LangGraph vs Deep Agents: choose one orchestration approach based on your use case — they are alternatives, not a required stack (see Framework Choice below).
  • Provider integrations (model, vector store, tools) are installed separately so you only pull in what you use. </overview>

<overview> LangChain生态系统由多个专注于特定功能、独立版本化的包组成。了解所需的包及其版本约束,可避免兼容性问题,并让升级过程可预测。
核心原则:
  • LangChain 1.0是当前的长期支持(LTS)版本。 新项目务必从1.0+版本开始。LangChain 0.3仅处于维护阶段——请勿用于新项目。
  • langchain-core是共享基础库:安装任何其他包时,务必显式安装它。
  • langchain-community(仅Python版本)不遵循语义化版本控制;请保守地固定其版本。
  • LangGraph vs Deep Agents: 根据你的使用场景选择一种编排方案——它们是替代方案,而非必须同时使用的技术栈(详见下方的框架选择)。
  • 提供商集成(模型、向量存储、工具)需单独安装,这样你只需引入实际使用的组件。 </overview>

Environment Requirements

环境要求

<environment-requirements>
RequirementPythonTypeScript / Node
Runtime minimumPython 3.10+Node.js 20+
LangChain1.0+ (LTS)1.0+ (LTS)
LangSmith SDK>= 0.3.0>= 0.3.0
</environment-requirements>
<environment-requirements>
要求PythonTypeScript / Node
最低运行环境Python 3.10+Node.js 20+
LangChain版本1.0+ (LTS)1.0+ (LTS)
LangSmith SDK版本>= 0.3.0>= 0.3.0
</environment-requirements>

Framework Choice

框架选择

<framework-choice> Pick **one** agent orchestration layer. You do not need both.
FrameworkWhen to useCore extra package
LangGraphNeed fine-grained graph control, custom workflows, loops, or branching
langgraph
/
@langchain/langgraph
Deep AgentsWant batteries-included planning, memory, file context, and skills out of the box
deepagents
(depends on LangGraph; installs it as a transitive dep)
Both sit on top of
langchain
+
langchain-core
+
langsmith
. </framework-choice>

<framework-choice> 选择**一种**Agent编排层,无需同时使用两者。
框架使用场景核心扩展包
LangGraph需要细粒度的图控制、自定义工作流、循环或分支逻辑
langgraph
/
@langchain/langgraph
Deep Agents希望开箱即用地获得规划、内存、文件上下文及Skill功能
deepagents
(依赖LangGraph,会作为传递依赖自动安装)
两者均基于
langchain
+
langchain-core
+
langsmith
构建。 </framework-choice>

Core Packages

核心包

<python-packages>
<python-packages>

Python — always required

Python — 必备包

PackageRoleMin version
langchain
Agents, chains, retrieval1.0
langchain-core
Base types & interfaces (peer dep)1.0
langsmith
Tracing, evaluation, datasets0.3.0
包名作用最低版本
langchain
Agent、链、检索功能1.0
langchain-core
基础类型与接口(对等依赖)1.0
langsmith
追踪、评估、数据集管理0.3.0

Python — orchestration (pick one)

Python — 编排框架(二选一)

PackageUse whenMin version
langgraph
Building custom graphs directly1.0
deepagents
Using the Deep Agents frameworklatest
包名使用场景最低版本
langgraph
直接构建自定义图1.0
deepagents
使用Deep Agents框架latest

Python — model providers (pick the one(s) you use)

Python — 模型提供商(按需选择)

PackageProvider
langchain-openai
OpenAI (GPT-4o, o3, …)
langchain-anthropic
Anthropic (Claude)
langchain-google-genai
Google (Gemini)
langchain-mistralai
Mistral
langchain-groq
Groq (fast inference)
langchain-cohere
Cohere
langchain-fireworks
Fireworks AI
langchain-together
Together AI
langchain-huggingface
Hugging Face Hub
langchain-ollama
Ollama (local models)
langchain-aws
AWS Bedrock
langchain-azure-ai
Azure AI Foundry
包名提供商
langchain-openai
OpenAI(GPT-4o, o3等)
langchain-anthropic
Anthropic(Claude)
langchain-google-genai
Google(Gemini)
langchain-mistralai
Mistral
langchain-groq
Groq(快速推理)
langchain-cohere
Cohere
langchain-fireworks
Fireworks AI
langchain-together
Together AI
langchain-huggingface
Hugging Face Hub
langchain-ollama
Ollama(本地模型)
langchain-aws
AWS Bedrock
langchain-azure-ai
Azure AI Foundry

Python — common tool & retrieval packages

Python — 常用工具与检索包

These packages have tighter compatibility requirements — use the latest available version unless you have a specific reason not to.
PackageAddsNotes
langchain-tavily
Tavily web search (
TavilySearch
)
Dedicated integration package; prefer latest
langchain-text-splitters
Text chunking utilitiesSemver, keep current
langchain-community
1000+ integrations (fallback)NOT semver — pin to minor series
faiss-cpu
FAISS vector store (local)Via
langchain-community
; use latest
langchain-chroma
Chroma vector storeDedicated integration package; prefer latest
langchain-pinecone
Pinecone vector storeDedicated integration package; prefer latest
langchain-qdrant
Qdrant vector storeDedicated integration package; prefer latest
langchain-weaviate
Weaviate vector storeDedicated integration package; prefer latest
langsmith[pytest]
pytest plugin for LangSmithRequires langsmith >= 0.3.4
langchain-community stability note: This package is NOT on semantic versioning. Minor releases can contain breaking changes. Prefer dedicated integration packages (e.g.
langchain-chroma
,
langchain-tavily
) when they exist — they are independently versioned and more stable.
</python-packages> <typescript-packages>
这些包的兼容性要求更严格——除非有特殊原因,否则请使用最新可用版本。
包名新增功能说明
langchain-tavily
Tavily网页搜索(
TavilySearch
专属集成包;优先使用最新版本
langchain-text-splitters
文本分块工具遵循语义化版本控制,保持最新
langchain-community
1000+种集成(备选方案)不遵循语义化版本控制——固定到次要版本系列
faiss-cpu
FAISS向量存储(本地)通过
langchain-community
安装;使用最新版本
langchain-chroma
Chroma向量存储专属集成包;优先使用最新版本
langchain-pinecone
Pinecone向量存储专属集成包;优先使用最新版本
langchain-qdrant
Qdrant向量存储专属集成包;优先使用最新版本
langchain-weaviate
Weaviate向量存储专属集成包;优先使用最新版本
langsmith[pytest]
LangSmith的pytest插件需要langsmith >= 0.3.4
langchain-community稳定性说明: 该包不遵循语义化版本控制。次要版本更新可能包含破坏性变更。如果存在专属集成包(如
langchain-chroma
langchain-tavily
),请优先使用——这些包独立版本化且更稳定。
</python-packages> <typescript-packages>

TypeScript — always required

TypeScript — 必备包

PackageRoleMin version
@langchain/core
Base types & interfaces (peer dep)1.0
langchain
Agents, chains, retrieval1.0
langsmith
Tracing, evaluation, datasets0.3.0
包名作用最低版本
@langchain/core
基础类型与接口(对等依赖)1.0
langchain
Agent、链、检索功能1.0
langsmith
追踪、评估、数据集管理0.3.0

TypeScript — orchestration (pick one)

TypeScript — 编排框架(二选一)

PackageUse whenMin version
@langchain/langgraph
Building custom graphs directly1.0
deepagents
Using the Deep Agents frameworklatest
包名使用场景最低版本
@langchain/langgraph
直接构建自定义图1.0
deepagents
使用Deep Agents框架latest

TypeScript — model providers (pick the one(s) you use)

TypeScript — 模型提供商(按需选择)

PackageProvider
@langchain/openai
OpenAI (GPT-4o, o3, …)
@langchain/anthropic
Anthropic (Claude)
@langchain/google-genai
Google (Gemini)
@langchain/mistralai
Mistral
@langchain/groq
Groq (fast inference)
@langchain/cohere
Cohere
@langchain/aws
AWS Bedrock
@langchain/azure-openai
Azure OpenAI
@langchain/ollama
Ollama (local models)
包名提供商
@langchain/openai
OpenAI(GPT-4o, o3等)
@langchain/anthropic
Anthropic(Claude)
@langchain/google-genai
Google(Gemini)
@langchain/mistralai
Mistral
@langchain/groq
Groq(快速推理)
@langchain/cohere
Cohere
@langchain/aws
AWS Bedrock
@langchain/azure-openai
Azure OpenAI
@langchain/ollama
Ollama(本地模型)

TypeScript — common tool & retrieval packages

TypeScript — 常用工具与检索包

PackageAddsNotes
@langchain/tavily
Tavily web search (
TavilySearch
)
Dedicated integration package; prefer latest
@langchain/community
Broad set of community integrationsUse sparingly; prefer dedicated packages
@langchain/pinecone
Pinecone vector storeDedicated integration package; prefer latest
@langchain/qdrant
Qdrant vector storeDedicated integration package; prefer latest
@langchain/weaviate
Weaviate vector storeDedicated integration package; prefer latest
@langchain/core
must be installed explicitly
in yarn workspaces and monorepos — it is a peer dependency and will not always be hoisted automatically.
</typescript-packages>
包名新增功能说明
@langchain/tavily
Tavily网页搜索(
TavilySearch
专属集成包;优先使用最新版本
@langchain/community
丰富的社区集成谨慎使用;优先选择专属包
@langchain/pinecone
Pinecone向量存储专属集成包;优先使用最新版本
@langchain/qdrant
Qdrant向量存储专属集成包;优先使用最新版本
@langchain/weaviate
Weaviate向量存储专属集成包;优先使用最新版本
@langchain/core
必须显式安装
在yarn工作区和单仓库多项目架构中——它是对等依赖,不会总是自动被提升安装。
</typescript-packages>

Minimal Project Templates

最小项目模板

<ex-langgraph-python> <python> Minimal dependency set for a LangGraph project (provider-agnostic). ```
<ex-langgraph-python> <python> LangGraph项目的最小依赖集(与提供商无关)。 ```

requirements.txt

requirements.txt

langchain>=1.0,<2.0 langchain-core>=1.0,<2.0 langgraph>=1.0,<2.0 langsmith>=0.3.0
langchain>=1.0,<2.0 langchain-core>=1.0,<2.0 langgraph>=1.0,<2.0 langsmith>=0.3.0

Add your model provider, e.g.:

添加你的模型提供商,例如:

langchain-openai

langchain-openai

langchain-anthropic

langchain-anthropic

langchain-google-genai

langchain-google-genai

</python>
</ex-langgraph-python>

<ex-langgraph-typescript>
<typescript>
Minimal package.json dependencies for a LangGraph project (provider-agnostic).
```json
{
  "dependencies": {
    "@langchain/core": "^1.0.0",
    "langchain": "^1.0.0",
    "@langchain/langgraph": "^1.0.0",
    "langsmith": "^0.3.0"
  }
}
</typescript> </ex-langgraph-typescript> <ex-deepagents-python> <python> Minimal dependency set for a Deep Agents project (provider-agnostic). ```
</python>
</ex-langgraph-python>

<ex-langgraph-typescript>
<typescript>
LangGraph项目的最小package.json依赖(与提供商无关)。
```json
{
  "dependencies": {
    "@langchain/core": "^1.0.0",
    "langchain": "^1.0.0",
    "@langchain/langgraph": "^1.0.0",
    "langsmith": "^0.3.0"
  }
}
</typescript> </ex-langgraph-typescript> <ex-deepagents-python> <python> Deep Agents项目的最小依赖集(与提供商无关)。 ```

requirements.txt

requirements.txt

deepagents # bundles langgraph internally langchain>=1.0,<2.0 langchain-core>=1.0,<2.0 langsmith>=0.3.0
deepagents # 内部包含langgraph langchain>=1.0,<2.0 langchain-core>=1.0,<2.0 langsmith>=0.3.0

Add your model provider, e.g.:

添加你的模型提供商,例如:

langchain-anthropic

langchain-anthropic

langchain-openai

langchain-openai

</python>
</ex-deepagents-python>

<ex-deepagents-typescript>
<typescript>
Minimal package.json dependencies for a Deep Agents project (provider-agnostic).
```json
{
  "dependencies": {
    "deepagents": "latest",
    "@langchain/core": "^1.0.0",
    "langchain": "^1.0.0",
    "langsmith": "^0.3.0"
  }
}
</typescript> </ex-deepagents-typescript> <ex-with-tools-python> <python> Adding Tavily search and a vector store to a LangGraph project. ```
</python>
</ex-deepagents-python>

<ex-deepagents-typescript>
<typescript>
Deep Agents项目的最小package.json依赖(与提供商无关)。
```json
{
  "dependencies": {
    "deepagents": "latest",
    "@langchain/core": "^1.0.0",
    "langchain": "^1.0.0",
    "langsmith": "^0.3.0"
  }
}
</typescript> </ex-deepagents-typescript> <ex-with-tools-python> <python> 为LangGraph项目添加Tavily搜索和向量存储。 ```

requirements.txt

requirements.txt

langchain>=1.0,<2.0 langchain-core>=1.0,<2.0 langgraph>=1.0,<2.0 langsmith>=0.3.0
langchain>=1.0,<2.0 langchain-core>=1.0,<2.0 langgraph>=1.0,<2.0 langsmith>=0.3.0

Web search

网页搜索

langchain-tavily # use latest; partner package, semver
langchain-tavily # 使用最新版本;合作伙伴包,遵循语义化版本控制

Vector store — pick one:

向量存储——选择其一:

langchain-chroma # use latest; partner package, semver
langchain-chroma # 使用最新版本;合作伙伴包,遵循语义化版本控制

langchain-pinecone # use latest; partner package, semver

langchain-pinecone # 使用最新版本;合作伙伴包,遵循语义化版本控制

langchain-qdrant # use latest; partner package, semver

langchain-qdrant # 使用最新版本;合作伙伴包,遵循语义化版本控制

Text processing

文本处理

langchain-text-splitters # use latest; semver
langchain-text-splitters # 使用最新版本;遵循语义化版本控制

Your model provider:

你的模型提供商:

langchain-openai / langchain-anthropic / etc.

langchain-openai / langchain-anthropic / 等

</python>
</ex-with-tools-python>

<ex-with-tools-typescript>
<typescript>
Adding Tavily search and a vector store to a LangGraph project.
```json
{
  "dependencies": {
    "@langchain/core": "^1.0.0",
    "langchain": "^1.0.0",
    "@langchain/langgraph": "^1.0.0",
    "langsmith": "^0.3.0",
    "@langchain/tavily": "latest",
    "@langchain/pinecone": "latest"
  }
}
</typescript> </ex-with-tools-typescript>
</python>
</ex-with-tools-python>

<ex-with-tools-typescript>
<typescript>
为LangGraph项目添加Tavily搜索和向量存储。
```json
{
  "dependencies": {
    "@langchain/core": "^1.0.0",
    "langchain": "^1.0.0",
    "@langchain/langgraph": "^1.0.0",
    "langsmith": "^0.3.0",
    "@langchain/tavily": "latest",
    "@langchain/pinecone": "latest"
  }
}
</typescript> </ex-with-tools-typescript>

Versioning Policy & Upgrade Strategy

版本控制策略与升级方案

<versioning-policy>
Package groupVersioningSafe upgrade strategy
langchain
,
langchain-core
Strict semver (1.0 LTS)Allow minor:
>=1.0,<2.0
langgraph
/
@langchain/langgraph
Strict semver (v1 LTS)Allow minor:
>=1.0,<2.0
langsmith
Strict semverAllow minor:
>=0.3.0
Dedicated integration packages (e.g.
langchain-tavily
,
langchain-chroma
)
Independently versionedAllow minor updates; use latest
langchain-community
NOT semverPin exact minor:
>=0.4.0,<0.5.0
deepagents
Follow project releasesPin to tested version in production
Breaking changes only happen in major versions (1.x → 2.x) for all semver-compliant packages. Deprecated features remain functional across the entire 1.x series with warnings.
Prefer dedicated integration packages over langchain-community. When a dedicated package exists (e.g.
langchain-chroma
instead of
langchain-community
's Chroma integration), use it — dedicated packages are independently versioned and better tested.
Community tool packages (Tavily, vector stores, etc.) should be kept at latest unless your project requires a locked environment. These packages frequently release compatibility fixes alongside LangChain/LangGraph updates.
</versioning-policy>
<versioning-policy>
包组版本控制方式安全升级策略
langchain
,
langchain-core
严格语义化版本控制(1.0 LTS)允许次要版本更新:
>=1.0,<2.0
langgraph
/
@langchain/langgraph
严格语义化版本控制(v1 LTS)允许次要版本更新:
>=1.0,<2.0
langsmith
严格语义化版本控制允许次要版本更新:
>=0.3.0
专属集成包(如
langchain-tavily
,
langchain-chroma
独立版本化允许次要版本更新;使用最新版本
langchain-community
不遵循语义化版本控制固定到精确的次要版本:
>=0.4.0,<0.5.0
deepagents
跟随项目发布版本生产环境固定到经过测试的版本
所有遵循语义化版本控制的包,仅在主版本更新时(1.x → 2.x)会出现破坏性变更。已废弃的功能在整个1.x系列中仍可使用,并会给出警告。
优先选择专属集成包而非langchain-community。如果存在专属包(如
langchain-chroma
而非langchain-community中的Chroma集成),请使用专属包——它们独立版本化且测试更充分。
社区工具包(Tavily、向量存储等)应保持最新版本,除非你的项目需要锁定环境。这些包通常会随LangChain/LangGraph更新同步发布兼容性修复。
</versioning-policy>

Environment Variables

环境变量

<environment-variables> All keys are read from the environment at runtime. Set only the keys for services you actually use.
bash
undefined
<environment-variables> 所有密钥在运行时从环境中读取。仅设置你实际使用的服务对应的密钥。
bash
undefined

LangSmith (always recommended for observability)

LangSmith(建议始终启用以实现可观测性)

LANGSMITH_API_KEY=<your-key> LANGSMITH_PROJECT=<project-name> # optional, defaults to "default"
LANGSMITH_API_KEY=<你的密钥> LANGSMITH_PROJECT=<项目名称> # 可选,默认为"default"

Model provider — set the one(s) you use

模型提供商——设置你使用的提供商密钥

OPENAI_API_KEY=<your-key> ANTHROPIC_API_KEY=<your-key> GOOGLE_API_KEY=<your-key> MISTRAL_API_KEY=<your-key> GROQ_API_KEY=<your-key> COHERE_API_KEY=<your-key> FIREWORKS_API_KEY=<your-key> TOGETHER_API_KEY=<your-key> HUGGINGFACEHUB_API_TOKEN=<your-key>
OPENAI_API_KEY=<你的密钥> ANTHROPIC_API_KEY=<你的密钥> GOOGLE_API_KEY=<你的密钥> MISTRAL_API_KEY=<你的密钥> GROQ_API_KEY=<你的密钥> COHERE_API_KEY=<你的密钥> FIREWORKS_API_KEY=<你的密钥> TOGETHER_API_KEY=<你的密钥> HUGGINGFACEHUB_API_TOKEN=<你的密钥>

Common tool/retrieval services

常用工具/检索服务

TAVILY_API_KEY=<your-key> # for Tavily search PINECONE_API_KEY=<your-key> # for Pinecone
</environment-variables>

---
TAVILY_API_KEY=<你的密钥> # 用于Tavily搜索 PINECONE_API_KEY=<你的密钥> # 用于Pinecone
</environment-variables>

---

Common Mistakes

常见错误

<fix-legacy-version> Never start a new project on LangChain 0.3. It is maintenance-only until December 2026. ```
<fix-legacy-version> 切勿在新项目中使用LangChain 0.3版本。它仅处于维护阶段,直到2026年12月。 ```

WRONG: legacy, no new features, security patches only

错误:旧版本,无新功能,仅提供安全补丁

langchain>=0.3,<0.4
langchain>=0.3,<0.4

CORRECT: LangChain 1.0 LTS

正确:LangChain 1.0 LTS版本

langchain>=1.0,<2.0
</fix-legacy-version>

<fix-community-unpinned>
`langchain-community` can break on minor version bumps — it does not follow semver.
langchain>=1.0,<2.0
</fix-legacy-version>

<fix-community-unpinned>
`langchain-community`在次要版本更新时可能出现故障——它不遵循语义化版本控制。

WRONG: allows minor-version updates that may be breaking

错误:允许可能包含破坏性变更的次要版本更新

langchain-community>=0.4
langchain-community>=0.4

CORRECT: pin to exact minor series

正确:固定到精确的次要版本系列

langchain-community>=0.4.0,<0.5.0
Also consider switching to the equivalent dedicated integration package if one exists (e.g. `langchain-chroma` instead of the community Chroma integration).
</fix-community-unpinned>

<fix-community-tool-outdated>
Community tool packages like `langchain-tavily` and vector store integrations release compatibility fixes alongside LangChain updates. Using an old pinned version can cause import errors or broken tool schemas.
langchain-community>=0.4.0,<0.5.0
如果存在对应的专属集成包,也可以考虑切换(例如用`langchain-chroma`替代社区版的Chroma集成)。
</fix-community-unpinned>

<fix-community-tool-outdated>
`langchain-tavily`等社区工具包和向量存储集成会随LangChain更新发布兼容性修复。使用旧的固定版本可能导致导入错误或工具架构损坏。

RISKY: old pin may be incompatible with LangChain 1.0

风险:旧版本可能与LangChain 1.0不兼容

langchain-tavily==0.0.1
langchain-tavily==0.0.1

BETTER: allow latest within the current major

更好:允许当前主版本内的最新版本

langchain-tavily>=0.1
</fix-community-tool-outdated>

<fix-community-import-deprecated>
Many tools that used to live in `langchain-community` now have dedicated packages with updated import paths. Always prefer the dedicated package import.

```python
langchain-tavily>=0.1
</fix-community-tool-outdated>

<fix-community-import-deprecated>
许多原属于`langchain-community`的工具现在有了专属包,且导入路径已更新。请始终优先使用专属包的导入方式。

```python

WRONG — deprecated community import path

错误——已废弃的社区版导入路径

from langchain_community.tools.tavily_search import TavilySearchResults from langchain_community.tools import WikipediaQueryRun from langchain_community.vectorstores import Chroma from langchain_community.vectorstores import Pinecone
from langchain_community.tools.tavily_search import TavilySearchResults from langchain_community.tools import WikipediaQueryRun from langchain_community.vectorstores import Chroma from langchain_community.vectorstores import Pinecone

CORRECT — use dedicated package imports

正确——使用专属包导入

from langchain_tavily import TavilySearch # pip: langchain-tavily (TavilySearchResults is deprecated) from langchain_community.tools import WikipediaQueryRun # no dedicated pkg yet from langchain_chroma import Chroma # pip: langchain-chroma from langchain_pinecone import PineconeVectorStore # pip: langchain-pinecone

To find the current canonical import for any integration, search the integrations directory:
https://python.langchain.com/docs/integrations/tools/

Each entry shows the correct package and import path. If a dedicated package exists, use it — the community path may still work but is considered legacy.
</fix-community-import-deprecated>

<fix-core-not-installed>
<typescript>
`@langchain/core` is a peer dependency — it must be in your package.json, especially in monorepos.
```json
// WRONG: missing @langchain/core (breaks in yarn workspaces / strict hoisting)
{
  "dependencies": {
    "@langchain/langgraph": "^1.0.0"
  }
}

// CORRECT: always list @langchain/core explicitly
{
  "dependencies": {
    "@langchain/core": "^1.0.0",
    "@langchain/langgraph": "^1.0.0"
  }
}
</typescript> </fix-core-not-installed> <fix-python-version> <python> Python 3.9 and below are not supported by LangChain 1.0. ```python
from langchain_tavily import TavilySearch # pip安装:langchain-tavily(TavilySearchResults已废弃) from langchain_community.tools import WikipediaQueryRun # 暂无专属包 from langchain_chroma import Chroma # pip安装:langchain-chroma from langchain_pinecone import PineconeVectorStore # pip安装:langchain-pinecone

要查找任何集成的当前标准导入方式,请搜索集成目录:
https://python.langchain.com/docs/integrations/tools/

每个条目都会显示正确的包和导入路径。如果存在专属包,请使用它——社区版路径可能仍可使用,但已被视为旧版。
</fix-community-import-deprecated>

<fix-core-not-installed>
<typescript>
`@langchain/core`是对等依赖——必须在package.json中声明,尤其是在单仓库多项目架构中。
```json
// 错误:缺少@langchain/core(在yarn工作区/严格提升安装环境中会报错)
{
  "dependencies": {
    "@langchain/langgraph": "^1.0.0"
  }
}

// 正确:始终显式声明@langchain/core
{
  "dependencies": {
    "@langchain/core": "^1.0.0",
    "@langchain/langgraph": "^1.0.0"
  }
}
</typescript> </fix-core-not-installed> <fix-python-version> <python> LangChain 1.0不支持Python 3.9及以下版本。 ```python

Verify before installing

安装前验证

import sys assert sys.version_info >= (3, 10), "Python 3.10+ required for LangChain 1.0"
</python>
</fix-python-version>

<fix-node-version>
<typescript>
Node.js below 20 is not officially supported.
```bash
import sys assert sys.version_info >= (3, 10), "LangChain 1.0需要Python 3.10+"
</python>
</fix-python-version>

<fix-node-version>
<typescript>
官方不支持Node.js 20以下版本。
```bash

Verify before installing

安装前验证

node --version # must be v20.x or higher
</typescript>
</fix-node-version>
node --version # 必须为v20.x或更高版本
</typescript>
</fix-node-version>