Langchain module ‘hnswlib‘ has no attribute ‘Index‘ 错误解决

Langchain module 'hnswlib' has no attribute 'Index' 错误解决

使用 Langchain 操作 Chroma 向量数据库时,报一下错误信息,

复制代码
module 'hnswlib' has no attribute 'Index'

试着重装了不同 hnswlib 版本没有解决,最后解决方法是,不要使用 hnswlib,使用 chroma-hnswlib,

复制代码
pip uninstall hnswlib

pip install chroma-hnswlib

完结!

相关推荐
逆风飞翔的小叔10 小时前
【AI智能体】Langchain 长期记忆使用实战操作详解
langchain·langchain 长期记忆·langchain 记忆使用·langchain 记忆详解·langchain 记忆
Logintern0919 小时前
langchain 将工具异常转换为模型可以处理的 ToolMessage
langchain
YIAN2 天前
从 LangChain 到 DeepAgents:手把手拆解 createAgent、Middleware 与复杂 Agent
javascript·langchain·deepseek
K74 天前
别再搜「LangChain 教程」了——你学的 Chain 已经被判了死刑
langchain·ai编程
xyphf_和派孔明4 天前
第六章: AI Agent长期记忆的存储引擎介绍
langchain·llm·agent
xyphf_和派孔明4 天前
第四章: AI Agent短期记忆的信息管理机制设计
langchain·llm·agent
叼烟扛炮4 天前
[LangChain] 学习笔记(13):并发不是越大越好——batch / gather / 信号量 / 配额治理
笔记·学习·langchain
叼烟扛炮4 天前
[LangChain] 学习笔记(09):工具(Tool)定义与调用闭环 · 理论+实战完整版
笔记·学习·langchain
仍然.6 天前
LangChain核心组件---消息
langchain
xyphf_和派孔明6 天前
第十章: Agent Skill的调用机制解读
langchain·llm·agent