Immutable solution version
ImportError: cannot import name 'ExhaustiveKnnAlgorithmConfiguration' from 'azure.search.documents.indexes.models
Complete solution
Pin the pair the reporter confirmed working: langchain==0.1.8 with azure-search-documents==11.4.0. (Azure AI Search; via gh:Azure/azure-sdk-for-python#34341)
ImportError: cannot import name 'ExhaustiveKnnAlgorithmConfiguration' from 'azure.search.documents.indexes.models
What happened
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
What works
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.
Caveats
This comes from one real issue thread (gh:Azure/azure-sdk-for-python#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.
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 1 · 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>