# LangChain Chat with Your Data: chroma vectorstore does not work with Python 3.10

**URL:** <https://community.deeplearning.ai/t/langchain-chat-with-your-data-chroma-vectorstore-does-not-work-with-python-3-10/636384>\
**Category:** LangChain: Chat with Your Data\
**Tags:** week-module-1\
**Created:** [May 28, 2024, 1:33pm UTC](https://community.deeplearning.ai/t/langchain-chat-with-your-data-chroma-vectorstore-does-not-work-with-python-3-10/636384 "2024-05-28T13:33:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pietzons](https://avatars.discourse-cdn.com/v4/letter/p/49beb7/32.png) [@pietzons](https://community.deeplearning.ai/u/pietzons)\
**Post date:** [May 28, 2024, 1:33pm UTC](https://community.deeplearning.ai/t/langchain-chat-with-your-data-chroma-vectorstore-does-not-work-with-python-3-10/636384/1 "2024-05-28T13:33:23Z")

</div>

I’m using the notebooks from

> **[DLAI - LangChain Chat with Your Data](https://learn.deeplearning.ai/courses/langchain-chat-with-your-data/lesson/4/vectorstores-and-embedding)**
>
> Introduction · Document Loading · Document Splitting · Vectorstores and Embedding · Retrieval · Question Answering · Chat · Conclusion

on an Colab-Environment, which runs python 3.10.  
there is an issue with the lib hnswlib:

AttributeError Traceback (most recent call last)  
 in \<cell line: 1\>()  
----\> 1 vectordb = Chroma.from\_documents(  
2 documents=splits,  
3 embedding=embedding,  
4 persist\_directory=persist\_directory  
5 )

12 frames  
/usr/local/lib/python3.10/dist-packages/chromadb/segment/impl/vector/local\_persistent\_hnsw.py in get\_file\_handle\_count()  
444 def get\_file\_handle\_count() → int:  
445 “”“Return how many file handles are used by the index”“”  
 → 446 hnswlib\_count = hnswlib.Index.file\_handle\_count  
447 hnswlib\_count = cast(int, hnswlib\_count)  
448 # One extra for the metadata file

AttributeError: type object ‘hnswlib.Index’ has no attribute ‘file\_handle\_count’

this issue has been reported in Git already:  
([AttributeError: type object 'hnswlib.Index' has no attribute 'file\_handle\_count' · Issue #1012 · zylon-ai/private-gpt · GitHub](https://github.com/zylon-ai/private-gpt/issues/1012))

But the fix cannot be applied here - it just moves to error to another dependcy.  
Any ideas how to fix this?

Thanks,  
Stephan

---

<div class="post-metadata">

**Author:** ![Hang\_Xu2](https://avatars.discourse-cdn.com/v4/letter/h/5f8ce5/32.png) [@Hang\_Xu2](https://community.deeplearning.ai/u/Hang_Xu2)\
**Post date:** [June 11, 2024, 9:53am UTC](https://community.deeplearning.ai/t/langchain-chat-with-your-data-chroma-vectorstore-does-not-work-with-python-3-10/636384/2 "2024-06-11T09:53:12Z")

</div>

Hi pietzons, I think you can try to align your python environment (downgrade some packages) with the notebook on the site. I notice that the python used in the class is 3.9.19, and for other packages, you can run “pip list” in the notebook cell to get their version. Adjusting the environment needs some patient. And you can see the “hnswlib” used is 0.7.0.
