iβm trying to deploy my first langchain app to the cloud and i keep getting a no module found error when i start the app.
This works fine on my local env, i have checked that the req.txt has the pypdf entry.
i have tried different things and cant seem to avoid this error on the cloud deployment,
much appreciated if someone can help me out here, thanks in advance
[03:07:38] π Python dependencies were installed from /mount/src/pbsguidelines/Pipfile using pipenv.
[03:07:38] π¦ WARN: More than one requirements file detected in the repository. Available options: pipenv /mount/src/pbsguidelines/Pipfile, pip /mount/src/pbsguidelines/requirements.txt. Used: pipenv with /mount/src/pbsguidelines/Pipfile
Check if streamlit is installed
Streamlit is already installed
[03:07:40] π¦ Processed dependencies!
2024-03-17 03:08:00.184 Uncaught app exception
Traceback (most recent call last):
File "/home/adminuser/venv/lib/python3.9/site-packages/langchain_community/document_loaders/pdf.py", line 177, in __init__
import pypdf # noqa:F401
ModuleNotFoundError: No module named 'pypdf'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 542, in _run_script
exec(code, module.__dict__)
File "/mount/src/pbsguidelines/main.py", line 67, in <module>
loader = PyPDFLoader(doc_path+"pbac-v5.pdf", extract_images=True)
File "/home/adminuser/venv/lib/python3.9/site-packages/langchain_community/document_loaders/pdf.py", line 179, in __init__
raise ImportError(
ImportError: pypdf package not found, please install it with `pip install pypdf`