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 :

streamlit==1.3.0
pandas==1.3.5
plotly==5.4.0
pymongo==3.11.0

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 :

Summary

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: https://pip.pypa.io/surveys/backtracking

And finally a warning :

Summary

Discarding https://files.pythonhosted.org/packages/ff/6d/9f5004f4619e64e25785029d3fab9807eddc780e194ba323ecd4007fa8c5/cffi-1.2.0-1.tar.gz#sha256=9b9c2b964fd88ddbf99ea8fff65c56264c8866b77050fd53f0159e53c98c27e0 (from Links for cffi). Requested cffi>=1.0.1 from https://files.pythonhosted.org/packages/ff/6d/9f5004f4619e64e25785029d3fab9807eddc780e194ba323ecd4007fa8c5/cffi-1.2.0-1.tar.gz#sha256=9b9c2b964fd88ddbf99ea8fff65c56264c8866b77050fd53f0159e53c98c27e0 (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.

Best,
Randy

Hi,
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,
Gabriel

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 : https://github.com/gabola29/rap_fr

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!

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