[Python] ModuleNotFoundError: No module named 'haystack.document_store.elasticsearch';...

Discussão em 'Python' iniciado por Stack, Junho 25, 2025.

  1. Stack

    Stack Membro Participativo

    I am building a Q&A webapp with elasticsearch. I have just successfully installed farm-haystack==1.3.0 and farm with requirements.txt.

    Now when I import the library, it pops up an error:

    from haystack.document_store.elasticsearch import ElasticsearchDocumentStore
    # from haystack.document_stores.elasticsearch import ElasticsearchDocumentStore


    document_store = ElasticsearchDocumentStore(host="localhost", username="", password="", index="document")


    error:

    ModuleNotFoundError: No module named 'haystack.document_store.elasticsearch'; 'haystack.document_store' is not a package


    It would be great if anyone can tell me how to fix it. I have made sure my haystack.document_store.elasticsearch is not document_store's'.

    Continue reading...

Compartilhe esta Página