ModuleNotFoundError: No module named 'haystack.document_store.faiss'; 'haystack.document_store' is not a package
See original GitHub issueQuestion I am trying to use haystack FAISS and other libraries in Haystack. Previously successfully I installed all requirements following your installation guild in my old deep learning GCP VM. But I needed to se up new deep learning VM and I did creat a new python environment with python 3.7, 3.10 none of them are satisfying requirements in your haystack package . When installing haystack it showing me the following error each and every time now and I can’t continue to my rest of code. I did even downgrade my torch version to 10 to satisfy requirements but still not be able to pass this. Could you please advise how to resolve. This is very urgent case for me.
Cheers Shabnam
Additional context
!pip3 install farm-haystack
!git clone https://github.com/deepset-ai/haystack.git
%cd haystack
!pip install --upgrade pip
!pip install -e '.[all-gpu]'
!pip install pymilvus
from haystack.document_store.faiss import FAISSDocumentStore
import os
# initialize FAISS
document_store = FAISSDocumentStore(
faiss_index_factory_str='Flat',
sql_url=f'sqlite:///docstore_japan.db',
return_embedding=True
)
Error:
/home/srashtchi001/anaconda3/envs/env_haystack_1/lib/python3.7/site-packages/tqdm/auto.py:22: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html
from .autonotebook import tqdm as notebook_tqdm
INFO - haystack.document_stores.base - Numba not found, replacing njit() with no-op implementation. Enable it with 'pip install numba'.
INFO - haystack.modeling.model.optimization - apex not found, won't use it. See https://nvidia.github.io/apex/
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
/tmp/ipykernel_16148/1811890211.py in <module>
1 get_ipython().system('pip install pymilvus')
2
----> 3 from haystack.document_store.faiss import FAISSDocumentStore
4
5 import os
ModuleNotFoundError: No module named 'haystack.document_store.faiss'; 'haystack.document_store' is not a package
FAQ Check
- [X ] Have you had a look at our new FAQ page?
Issue Analytics
- State:
- Created a year ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
python - ModuleNotFoundError: No module named 'haystack ...
I have made sure my haystack.document_store.elasticsearch is not document_store's'. python · elasticsearch · nlp · document-store · haystack.
Read more >Debugging Haystack — Haystack 2.5.0 documentation
“No module named haystack.”¶. This problem usually occurs when first adding Haystack to your project. Are you using the haystack directory within your ......
Read more >farm-haystack - PyPI
Haystack is an end-to-end framework that enables you to build powerful and production-ready pipelines for different search use cases.
Read more >Adding New Doc Stores to Haystack - YouTube
Install direct from PyPI with:pip install 'farm- haystack [pinecone]'PR:https://github.com/deepset-ai/ haystack /pull/2254 70%...
Read more >Tutorial: Build a QA System Without Elasticsearch - Haystack
You can use an InMemoryDocumentStore or a SQLDocumentStore (with SQLite) as the document store. If you are interested in more feature-rich Elasticsearch, then ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for providing the detail. As you suggest I did set up new python environment using python 3.9 and just installed the Haystack requirements as bove. All works now. I appreciate all of the time you have spent.
Glad to hear that the Haystack installation worked now. 👍 The Nvidia driver is unaffected by the Haystack installation though. They are completely separate. However, maybe you did a reboot so that a new driver/a different driver was loaded, which failed? The problem is definitely not related to Haystack. Three pointers I can give you: