ModuleNotFoundError: No module named 'langchain' , lib already present in requirements.txt

So I am trying to upload my chatbot on the community cloud, it works fine on local , but on deploying to the cloud , i get the below error.

2024-01-01 18:05:37.183 503 GET /script-health-check ( 187.19ms

2024-01-01 18:05:42.017 Uncaught app exception

Traceback (most recent call last):

File “/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/”, line 534, in _run_script

exec(code, module.__dict__)

File “/mount/src/streamlit-example/”, line 16, in

from langchain.document_loaders import PyPDFLoader

ModuleNotFoundError: No module named ‘langchain’

2024-01-01 18:05:42.206 503 GET /script-health-check ( 190.68ms

The requirements.txt file already has the required library.

The link to the public deployed app:

The link to your app’s public GitHub repository : GitHub - Alphapara97/streamlit-example: Example Streamlit app that you can fork to test out

the Streamlit and Python versions
Streamlit, version 1.29.0
Python 3.9.13


Fixed it, had to redeploy it, with few changes in the package version.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.