ModuleNotFoundError: No module named 'joblib'

I’m not able to deploy my app on streamlit share. It is not able to find joblib. Please help me.
my github repo: Eclipse/streamlit_app at master · ArshKaushik/Eclipse · GitHub

1 Like

Please paste the logs.

Hi @ArshKaushik, welcome to the Streamlit community!

This is a subtle misfeature we’re working to solve…your requirements.txt file needs to be at the top-level of your repo; in your repo, the requirements.txt file is a streamlit_app/requirements.txt. So Streamlit sharing isn’t installing your dependencies, and thus, it can’t find joblib (or anything else).



I am facing the same issue. Found no way to move the requirements file up the stack as the files are automatically arranged in ascending order.


This isn’t a recommendation to change the sorting order of files, as that is likely operating system dependent. Rather, the recommendation is to have the file at the top-level of the file directory. Meaning, not having requirements.txt inside of a nested folder, but rather inside the repo without any other nesting.


1 Like

Is there any update to resolve this issue or would you like to suggest an alternative to joblib.

Can you post a link to your code?

I have the same issue - even though streamlit says that it is installing joblib:

Collecting joblib==1.0.1
Downloading joblib-1.0.1-py3-none-any.whl (303 kB)

when building the app, it always runs into the error
ModuleNotFoundError: No module named 'joblib'

Link to Repo: GitHub - jonas-nothnagel/NLP-Project-Documents: Working Repo for building a set of models to automate the classification of project log-frames to a comprehensive taxonomy. Data can not be pushed yet.

Hi @jonas-nothnagel -

In Streamlit sharing, it seems like it works (meaning, it doesn’t throw an error message), but locally I get the following:

(nlptest) rzwitch@threadripper:~/github_work/NLP-Project-Documents$ pip install -r requirements.txt 
Collecting en_core_web_sm
  Using cached en_core_web_sm-2.3.1-py3-none-any.whl
ERROR: Cannot install -r requirements.txt (line 16) and spacy==3.0.1 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested spacy==3.0.1
    en-core-web-sm 2.3.1 depends on spacy<2.4.0 and >=2.3.0

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit

Are you sure your dependencies are correct? I’ll also forward this on to our cloud team to see if they have any ideas.


This is a mistake indeed. It is weird that I did not get this error when deploying the app then.

It works perfectly locally, but when trying to share I always run into the joblib error as if the requirements are not even installed at all…

@randyzwitch on a personal note, would you mind to “unfork” my repo - not sure if I should share it yet, I just wanted to be ready for deployment :slight_smile:

Sure, but note that once your code is “in the wild”, it’s kinda too late. Keep that in mind if you share things on GitHub :slight_smile: