ModuleNotFoundError: No module named 'langchain.chat_models'

ModuleNotFoundError: No module named 'langchain.chat_models'

This article is part of the following article to address some installation issues:

After installing langchain[all], You might face the following error after you install langchain

ModuleNotFoundError: No module named 'langchain.chat_models'        

Here is what I have done:

pip install 'langchain[all]'          

It will install successfully, then the first time I try to import as follows:

from langchain.chat_models import AzureChatOpenAI        

You will get the following error:

ModuleNotFoundError: No module named 'langchain.chat_models'        


Here is the fix:

pip install --upgrade langchain        

Upgrading LangChain will fix the issue. Let me know if you still face the issue.


Christopher Krakauer

“... just this guy, you know?”

1 年

Thank you, just saved a wall from my head

要查看或添加评论,请登录

Rany ElHousieny, PhD???的更多文章

社区洞察

其他会员也浏览了