ModuleNotFoundError: No module named 'langchain.chat_models'
Rany ElHousieny, PhD???
Generative AI ENGINEERING MANAGER | ex-Microsoft | AI Solutions Architect | Generative AI & NLP Expert | Proven Leader in AI-Driven Innovation | Former Microsoft Research & Azure AI | Software Engineering Manager
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.
“... just this guy, you know?”
1 年Thank you, just saved a wall from my head