Deploy Error, Module Pymongo Not Found

Hello, I encounter an “ModuleNotFoundError” when deployed, for pymongo, even if it is specified in the requirements file.

Here are my requirements :


And here is, the github link : GitHub - gabola29/app_rappeur_francais

In the logs, I’ve seen some “weird” things who are probably related whith file, but I don’t how to interpret them and fix it.

First this :


INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here:

And finally a warning :


Discarding (from Links for cffi). Requested cffi>=1.0.1 from (from argon2-cffi-bindings->argon2-cffi->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit==1.3.0->-r /app/app_rappeur_francais/requirements.txt (line 1)) has inconsistent version: filename has ‘1.2.0.post1’, but metadata has ‘1.2.0’

Thank you for your help !

Hi @Gabriel_Letty, welcome to the Streamlit community!

With the first warning, it’s telling you that pip is having a hard time resolving the exact dependencies you are specifying. For the second one, r /app/app_rappeur_francais/requirements.txt (line 1)) has inconsistent version: filename has ‘1.2.0.post1’, but metadata has ‘1.2.0’ I don’t know what exactly this is, but it’s saying it can’t resolve your dependencies.

The first thing I would try would be to loosen your dependencies even further to see if it will resolve. Meaning, unless you specifically need pandas 1.3.5, maybe just put pandas >= 1.0, same with pymongo and maybe even plotly.


Thank you for your reply.
I tried your solution, with all the packages combine (except streamlit), but I still get the same error.
I’m trying with a conda yml, I don’t know if this can change something.

Best regards,

I tried to access your GitHub link, but it gives me a ‘Not found’ error. If you can link to the GitHub repo, then I can take a look

Yes, sorry, I created a new one here :

Thanks. I’m trying to work through this error with our engineering team, but in the meantime, if you delete the environment.yml file and put the requirements in a requirements.txt is seems to work.

It works!
Thanks a lot for your help!