Getting hnswlib error Index' has no attribute 'file_handle_count'

huangapple go评论84阅读模式
英文:

Getting hnswlib error Index' has no attribute 'file_handle_count'

问题

我正在尝试使用 chromadb,但出现了错误:

c:\Users\satya\AppData\Local\Programs\Python\Python39\lib\site-packages\chromadb\config.py 中的实例(self, type)
hnswlib_count = hnswlib.Index.file_handle_count
hnswlib_count = cast(int, hnswlib_count)

AttributeError: 类型对象 'hnswlib.Index' 没有属性 'file_handle_count'

我正在使用 Python3.9hnswlibchromadb 的版本如下:

PS C:\Users\satya> pip show hnswlib
名称: hnswlib
版本: 0.7.0
摘要: hnswlib
主页: https://github.com/yurymalkov/hnsw
作者: Yury Malkov 和其他人
作者邮箱:
许可证:
位置: c:\users\satya\appdata\local\programs\python\python39\lib\site-packages
依赖: numpy
被依赖:

PS C:\Users\satya> pip show chromadb
名称: chromadb
版本: 0.4.5
摘要: Chroma.
主页:
作者:
作者邮箱: Jeff Huber <jeff@trychroma.com>, Anton Troynikov <anton@trychroma.com>
许可证:
位置: c:\users\satya\appdata\local\programs\python\python39\lib\site-packages
依赖: chroma-hnswlib, fastapi, importlib-resources, numpy, onnxruntime, overrides, posthog, pulsar-client, pydantic, pypika, requests, tokenizers, tqdm, typing-extensions, uvicorn
被依赖:

请注意,这是您提供的内容的翻译。

英文:

I am trying to use chromadb which is giving me error:

c:\Users\satya\AppData\Local\Programs\Python\Python39\lib\site-packages\chromadb\config.py in instance(self, type)
hnswlib_count = hnswlib.Index.file_handle_count
hnswlib_count = cast(int, hnswlib_count)

AttributeError: type object &#39;hnswlib.Index&#39; has no attribute &#39;file_handle_count&#39;

I am using Python3.9 and versions of hnswlib and chromadb are:

PS C:\Users\satya&gt; pip show hnswlib
Name: hnswlib
Version: 0.7.0
Summary: hnswlib
Home-page: https://github.com/yurymalkov/hnsw
Author: Yury Malkov and others
Author-email: 
License: 
Location: c:\users\satya\appdata\local\programs\python\python39\lib\site-packages
Requires: numpy
Required-by: 

PS C:\Users\satya&gt; pip show chromadb
Name: chromadb
Version: 0.4.5
Summary: Chroma.
Home-page:
Author:
Author-email: Jeff Huber &lt;jeff@trychroma.com&gt;, Anton Troynikov &lt;anton@trychroma.com&gt;
License:
Location: c:\users\satya\appdata\local\programs\python\python39\lib\site-packages
Requires: chroma-hnswlib, fastapi, importlib-resources, numpy, onnxruntime, overrides, posthog, pulsar-client, pydantic, pypika, requests, tokenizers, tqdm, typing-extensions, uvicorn
Required-by:

答案1

得分: 1

使用chromadb==0.4.3版本帮助我解决了与Python 3.9的问题。

英文:

Using the chromadb==0.4.3 version helped me to resolve the issue with python 3.9

huangapple
  • 本文由 发表于 2023年8月9日 12:12:39
  • 转载请务必保留本文链接:https://go.coder-hub.com/76864523-2.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定