Open wesslen opened 2 months ago
So back to local install -- good news is I found I wasn't pointing to correct venv (notice it was using python3.10
yet I set up my venv
with python3.11
.
I saw you do have haystack-ai
in requirements.txt
, so it's not the requirements.txt
. I corrected my right venv
(python3.11
) but now I get this error.
Traceback (most recent call last):
File "/final-projects/CorpPulse/venv/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 600, in _run_script
exec(code, module.__dict__)
File "/final-projects/CorpPulse/app.py", line 18, in <module>
from pipeline import rag_pipeline
File "/final-projects/CorpPulse/pipeline.py", line 1, in <module>
from haystack.document_stores.in_memory import InMemoryDocumentStore
File "/final-projects/CorpPulse/venv/lib/python3.11/site-packages/haystack/document_stores/in_memory/__init__.py", line 1, in <module>
from haystack.document_stores.in_memory.document_store import InMemoryDocumentStore
File "/final-projects/CorpPulse/venv/lib/python3.11/site-packages/haystack/document_stores/in_memory/document_store.py", line 8, in <module>
from haystack import default_from_dict, default_to_dict, logging
ImportError: cannot import name 'default_from_dict' from 'haystack' (/final-projects/CorpPulse/venv/lib/python3.11/site-packages/haystack/__init__.py)
So problem is ImportError: cannot import name 'default_from_dict' from 'haystack' (/final-projects/CorpPulse/venv/lib/python3.11/site-packages/haystack/__init__.py)
.
I'm wondering if perhaps you didn't pin the right version of haystack-ai
.
Found this: https://github.com/deepset-ai/haystack/issues/6470#issuecomment-1900723211
I think at some point haystack-ai
changed its import. My recommendation would be to pin haystack-ai
to an earlier version. I suspect you took an online tutorial that called haystack using the older import way but your requirements.txt
is installing the latest version.
Tried to run locally and got this![image](https://github.com/dhasty1/CorpPulse/assets/7621432/7a7ed975-7590-45bc-b3b8-cc717484dadd)
Steps done:
Running on M1 Mac.
Found in logs:
Looks like yourrequirements.txt
isn't correct.Corrected. That wasn't the problem. See below new problem.