chroma
chroma copied to clipboard
Import error with chromadb.Client()
import chromadb
chroma_client = chromadb.Client()
This command throws the following error:
Using embedded DuckDB without persistence: data will be transient
ImportError Traceback (most recent call last) <ipython-input-2-a18ba46ad5f4> in <module> ----> 1 chroma_client = chromadb.Client()
~/anaconda3/lib/python3.8/site-packages/chromadb/init.py in Client(settings) 81 import chromadb.api.local 82 ---> 83 return chromadb.api.local.LocalAPI(settings, get_db(settings), telemetry_client) 84 else: 85 raise ValueError(f"Expected chroma_api_impl to be one of rest, local, got {setting}")
~/anaconda3/lib/python3.8/site-packages/chromadb/init.py in get_db(settings) 48 require("persist_directory") 49 logger.warning("Using embedded DuckDB without persistence: data will be transient") ---> 50 import chromadb.db.duckdb 51 52 return chromadb.db.duckdb.DuckDB(settings)
~/anaconda3/lib/python3.8/site-packages/chromadb/db/duckdb.py in <module> 1 from chromadb.api.types import Documents, Embeddings, IDs, Metadatas ----> 2 from chromadb.db.clickhouse import ( 3 Clickhouse, 4 db_array_schema_to_clickhouse_schema, 5 EMBEDDING_TABLE_SCHEMA,
~/anaconda3/lib/python3.8/site-packages/chromadb/db/clickhouse.py in <module> 1 from chromadb.api.types import Documents, Embeddings, IDs, Metadatas, Where, WhereDocument 2 from chromadb.db import DB ----> 3 from chromadb.db.index.hnswlib import Hnswlib, delete_all_indexes 4 from chromadb.errors import ( 5 NoDatapointsException,
~/anaconda3/lib/python3.8/site-packages/chromadb/db/index/hnswlib.py in <module> 4 from typing import Dict 5 from chromadb.api.types import IndexMetadata ----> 6 import hnswlib 7 from chromadb.db.index import Index 8 from chromadb.errors import NoIndexException, InvalidDimensionException, NotEnoughElementsException
ImportError: /home/ubuntu/anaconda3/lib/python3.8/site-packages/hnswlib.cpython-38-x86_64-linux-gnu.so: undefined symbol: _ZNSt15__exception_ptr13exception_ptr10_M_releaseEv
I am using following versions:
OS: Ubuntu 22.04 Python: 3.8.8 PIP: 21.0.1 CUDA: 11.4 Nvidia Driver: 470.182.03
Can someone help on this please?
https://github.com/nmslib/hnswlib/issues/442
seems to be a problem with hnswlib at the moment. Have you tried Python3.10
like in the Dockerfile?
Well, it works with same Python and Pip version on MacOS Ventura 13.2.1.
Also, the hnswlib
version in both cases is same as 0.7.0
I am looking into the hnswlib
issues.
@mausamsion did you figure this out? closing for now, but happy to re-open