Psycopg2 with Streamlit Sharing

I am trying to deploy my streamlit app, which uses the psycopg2 module to retrieve data from a Postgresql database.
On my mac, I have installed the module using ‘pip install psycopg2-binary’, which is a psycopg2 wheel package. I have tried adding both psycopg2 and psycopg2-binary to the requirements.txt file when deploying the app, but none of this seems to work out for me.

Does anybody have a solution for this?

Hi @ns-gambhirkshitij, welcome to the Streamlit community!

When you say it “doesn’t work”, what are you seeing? The packages don’t install, you can’t connect to a database, something else?

Best,
Randy