cancel
Showing results for 
Search instead for 
Did you mean: 
Get Started Discussions
Start your journey with Databricks by joining discussions on getting started guides, tutorials, and introductory topics. Connect with beginners and experts alike to kickstart your Databricks experience.
cancel
Showing results for 
Search instead for 
Did you mean: 

Notebook Langchain ModuleNotFoundError: No module named 'langchain.retrievers.merger_retriever'

bento
New Contributor

Hi,
As mentioned in the title, receiving this error despite

%pip install --upgrade langchain

Specific line of code:

from langchain.retrievers.merger_retriever import MergerRetriever
 
All other langchain import works when this is commented out. Same line works on my local VS Code.
Appreciate any help with this issue. Thanks!
1 ACCEPTED SOLUTION

Accepted Solutions

sean_owen
Databricks Employee
Databricks Employee

More specifically: langchain releases a new update every few days, and it is likely that you are using code or a library that needs a later version of langchain than you have (or, perhaps, a later version that removed whatever part of langchain you rely on). You need to figure out what version of langchain works for your use case and pin it. Updating to the latest version every time makes you vulnerable to breaking changes like this.

View solution in original post

1 REPLY 1

sean_owen
Databricks Employee
Databricks Employee

More specifically: langchain releases a new update every few days, and it is likely that you are using code or a library that needs a later version of langchain than you have (or, perhaps, a later version that removed whatever part of langchain you rely on). You need to figure out what version of langchain works for your use case and pin it. Updating to the latest version every time makes you vulnerable to breaking changes like this.

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now