langchain安装环境错误汇总

langchain安装环境最好是python3.10
安装包版本

# python 3.10
langchain==0.0.201
openai==0.27.8
unstructured==0.7.6
chromadb==0.3.26
tiktoken==0.4.0

可能会遇到一些错误:
module ‘openai’ has no attribute ‘ChatCompletion’
解决办法:python 3.10 openai>=0.27.0

安装hnswlib出错
ERROR: Failed to build hnswlib
解决办法:https://blog.csdn.net/weixin_38336546/article/details/114033189

langchain: No module named ‘langchain.document_loaders’
解决办法:https://stackoverflow.com/questions/75907516/langchain-no-module-named-langchain-document-loaders

你可能感兴趣的:(python,python)