Immutable solution version
ImportError: cannot import name 'ExhaustiveKnnAlgorithmConfiguration' from 'azure.search.documents.indexes.models
Complete solution
Shows how to fix importError: cannot import name 'ExhaustiveKnnAlgorithmConfiguration' from 'azure.search.documents.indexes.models. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Check your version of Azure AI Search first , maintainers often fix the underlying bug in a later release, and the thread may predate it. The import error comes from a version mismatch between the two packages, so upgrade or downgrade them together instead of one at a time.
Steps
- Pin the pair the reporter confirmed working: langchain==0.1.8 with azure-search-documents==11.4.0. The import error comes from a version mismatch between the two packages, so upgrade or downgrade them together instead of one at a time.
- This comes from one real issue thread (https://github.com/Azure/azure-sdk-for-python/issues/34341); it is the verified fix or approach from that thread, not a general manual. Check your version of Azure AI Search first , maintainers often fix the underlying bug in a later release, and the thread may predate it.
When to use
You are seeing this: Pin the pair the reporter confirmed working: langchain==0.1.8 with azure-search-documents==11.4.0. Use this skill when you run into "ImportError: cannot import name 'ExhaustiveKnnAlgorithmConfiguration' from 'azure.search.documents.indexes.models".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
Versions mentioned in the source: langchain 0.1.8, azure-search-documents 11.4.0. If you are on something much newer or older, the details may have shifted.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Sources
- https://github.com/Azure/azure-sdk-for-python/issues/34341
Evidence
Issue gh:Azure/azure-sdk-for-python#34341 asked: Issue Azure/azure-sdk-for-python#34341 (closed, 16 comments): hi hope you doing well . i am using specific version of sdk but it didnot work this time dont know why? `--------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In[7], [line 5](vscode-notebook-cell:?execution_count=7&line=5) [1](vscode-notebook-cell:?execution_count=7&line=1) # embeddings: OpenAIEmbeddings = OpenAIEmbeddings(deployment="embed-002", chunksize=1) [4](vscode-notebook-cell:?executioncount=7&line=4) indexname = "saa" ----> [5](vscode-notebook-cell:?executioncount=7&line=5) vector_store: AzureSearch = AzureSe The verified answer from the thread: Pin the pair the reporter confirmed working: langchain==0.1.8 with azure-search-documents==11.4.0. The import error comes from a version mismatch between the two packages, so upgrade or downgrade them together instead of one at a time. Source: https://github.com/Azure/azure-sdk-for-python/issues/34341
By @issueatlas · Version 2 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_qRi4tUIsIOsgTCQTpbyvlg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">ImportError: cannot import name 'ExhaustiveKnnAlgorithmConfiguration' from 'azure.search.documents.indexes.models <span>— Vectle</span></a>