ERROR: Could not find a version that satisfies the requirement pickle (from versions: none) ERROR: No matching distribution found for pickle

I’m trying to deploy an app that uses a pickled model. The pickled model was compressed using bz2. The app works on when using local host but I’m getting an error when deploying via streamlit.

Is there anything that I should be doing differently when deploying via streamlit sharing?
This is my first time using streamlit so still unsure about how to go about it.


Hi @daphnedomingo, welcome to the Streamlit community!

Pickle is part of the Python standard library, so it’s hard to say what the issue is. Can you provide a link to the Github repo you are trying to deploy?


Hi @randyzwitch, thanks! Really liking Streamlit so far.

Here’s a link to the repo. GitHub - daphnedomingo/TennisApp: Tennis Prediction App

Thank you!



Hi @daphnedomingo :wave:

Thanks for sharing the link to your repo! Both pickle and bz2 are part of the Python standard library. As such, they can’t be installed with pip. To fix the Could not find a version... error, delete lines 4 and 5 from the requirements file.

When I made the above change :point_up: to my forked copy of the requirements file, the app successfully imported pickle and bz2. However, there was an issue loading the compressed pickled model. I suspect the model uploaded via Git LFS may be corrupted, but I can’t be sure.

If you run into the unpickling issue, it might warrant a new forum thread :eyes:

Happy Streamlit’ing! :balloon:

1 Like

@snehankekre Thank you!

I’ll check the pickled model as I am able to load it locally (yes, issue is probably uploading with GitLFS).

Thank you again for the help!



1 Like