deepset-ai / haystack

AI orchestration framework to build customizable, production-ready LLM applications. Connect components (models, vector DBs, file converters) to pipelines or agents that can interact with your data. With advanced retrieval methods, it's best suited for building RAG, question answering, semantic search or conversational agent chatbots.
https://haystack.deepset.ai
Apache License 2.0
17.72k stars 1.92k forks source link

haystack.utils has issues, can't do imports #8315

Closed pdwytr closed 2 months ago

pdwytr commented 2 months ago

Describe the bug I just cannot do imports, Idk whats going on here

Error message ModuleNotFoundError: No module named 'haystack.utils.auth'

Expected behavior A clear and concise description of what you expected to happen.

Additional context Add any other context about the problem here, like document types / preprocessing steps / settings of reader etc.

To Reproduce install poetry python3.12 and poetry add 'farm-haystack'

System:

julian-risch commented 2 months ago

Hello @pdwytr with farm-haystack you're installing an older version of Haystack, 1.26. That version has no haystack.utils.auth module: https://github.com/deepset-ai/haystack/tree/v1.26.x/haystack/utils

In order to use the most recent Haystack version, 2.4, please install the package haystack-ai. That version has a haystack.utils.auth module and your import should work as expected: https://github.com/deepset-ai/haystack/tree/v2.4.x/haystack/utils Note that the farm-haystack and haystack-ai packages are not compatible and cannot be installed in the same environment. Please make sure you're using a fresh environment when installing haystack-ai.

If you're still facing problems with the import, feel free to reopen this issue.

pdwytrias commented 2 months ago

This worked! Thanks