joblib module error on deployment

App: https://customer-subscription-predictor.streamlit.app/
Repo: GitHub - mattclark186/uyBvjh22fVpcb3UX: uyBvjh22fVpcb3UX · GitHub
Error:

ModuleNotFoundError: No module named 'joblib'

2026-09-30 15:21:45.270 Session with id f664862f-e209-4d45-8096-93f102b1ff26 is already connected! Reconnecting to existing session.

────────────────────── Traceback (most recent call last) ───────────────────────

/home/adminuser/.conda/lib/python3.12/site-packages/streamlit/runtime/script

runner/exec_code.py:136 in exec_func_with_error_handling

/home/adminuser/.conda/lib/python3.12/site-packages/streamlit/runtime/script

runner/script_runner.py:909 in code_to_exec

/mount/src/uybvjh22fvpcb3ux/webapp.py:10 in <module>

7

8 st.write("Pandas:", pd.__version__)

9

❱ 10 import joblib

11

12

13

────────────────────────────────────────────────────────────────────────────────

ModuleNotFoundError: No module named 'joblib'

My app works fine when hosted locally but when deployed on streamlit cloud it has the error where joblib isn’t installed. I have my requirements.txt file in the same folder (top folder) as my webapp.py file in the repository. The file contains joblib. I have tried specifying versions of joblib within requirements.txt but that didn’t help. It seems as though pandas is being installed fine, so it’s not an issue with being able to find the requirements.txt file. I can’t see why the joblib package won’t install. Please help.

Hey there, thanks for sharing your question and all the details—welcome to the Streamlit community! :balloon: This is a classic issue, and you’re not alone. When you see ModuleNotFoundError: No module named ‘joblib’ on Streamlit Community Cloud, even though joblib is in your requirements.txt, it’s almost always due to one of these:

  • The requirements.txt file isn’t being picked up because of its location or filename.
  • There’s another dependency file (like environment.yml, Pipfile, or uv.lock) in the same directory or root, and Streamlit Cloud is using that instead of requirements.txt.
  • There’s a typo in the filename (e.g., Requirements.txt instead of requirements.txt).
  • requirements.txt is not in the root of the repo or the same directory as your entrypoint file.

According to the official docs, Streamlit Community Cloud will use the first dependency file it finds, prioritizing the entrypoint directory, then the repo root, and only one file is used. If you have multiple dependency files, only the first one found is used, and others are ignored. Also, make sure your requirements.txt is named exactly that (all lowercase) and is in the same directory as webapp.py or at the repo root. If you have other files like environment.yml or Pipfile, try removing them or ensuring requirements.txt is the only one present. After making changes, commit, push, and reboot your app. For more, see the docs on app dependencies and the ModuleNotFoundError FAQ.

If you’re still stuck, please share your requirements.txt content and repo structure so the community can help debug further. Minimum reproducible examples are always welcome! Folks, feel free to jump in with your insights or similar experiences.

Sources: