获取 hnswlib 错误:Index’ 没有属性 ‘file_handle_count’

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

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 in instance(self, type)
hnswlib_count = hnswlib.Index.file_handle_count
hnswlib_count = cast(int, hnswlib_count)

AttributeError: type object 'hnswlib.Index' has no attribute 'file_handle_count'

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

PS C:\Users\satya> 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> pip show chromadb
Name: chromadb
Version: 0.4.5
Summary: Chroma.
Home-page:
Author:
Author-email: Jeff Huber <jeff@trychroma.com>, Anton Troynikov <anton@trychroma.com>
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:
英文:

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 'hnswlib.Index' has no attribute 'file_handle_count'

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

PS C:\Users\satya> 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> pip show chromadb
Name: chromadb
Version: 0.4.5
Summary: Chroma.
Home-page:
Author:
Author-email: Jeff Huber <jeff@trychroma.com>, Anton Troynikov <anton@trychroma.com>
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.html
匿名

发表评论

匿名网友

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

确定