I am getting error "no module joblib" when I run it in Cloud

[08:10:42] 📦 Processed dependencies!

Collecting usage statistics. To deactivate, set browser.gatherUsageStats to False.




2023-03-12 08:11:04.949 Uncaught app exception
Traceback (most recent call last):
  File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script
    exec(code, module.__dict__)
  File "/app/pycharm_customer_behaviour/Cst_Nature.py", line 4, in <module>
    import joblib
ModuleNotFoundError: No module named 'joblib'

If you ask for help, please provide a link to your public github repo.

  • the correct file name is requirements.txt
  • remove all windows executables from the repo, streamlit cloud is a linux debian based runtime.
  • your requirements file is a mess and will not deploy on streamlit cloud. You don’t need all these packages. Delete it and write it manually from scratch. This is all you need in the file:
joblib
pandas
streamlit

Thankyou for the help I’ll rectify the problems, as soon the cloud comes back from maintenance!

Hello @Franky1, I have been struggling with this same import error issue.

It seems my requirement packages are not getting installed.

Here is a link to the Github repo: Github repo

Hoping to hear from you soon.

Thanks.

Hello @Franky1,

I have been experiencing this same issue while trying to deploy on Streamlit cloud.

Here is a link to the Github repo Github repo

Hoping to hear from you soon.

Thanks.

Hey @Yinka and @Rajnikant21 ,

I believe thet Franky already mentioned this but, try to put your current working version of joblib into the requirements.txt file and re-deploy the app. You can use pip freeze or pip list to find all your imported packages and their current versions.

Copying down the package versions helps streamlit cloud build your app as close as possible to your localhost version. Please let me know if it worked!

Hope this helps!

Thanks for your support, I actually tried this way
Deleted all other requirements in the .txt file and mentioned those which I was using in my code only, and next time when I would mention some other Library, I’ll put that in my requirements too.

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