ModuleNotFoundError: psycopg2, the data connection works on local drive, but not on Streamlit Cloud

Hi @frances, welcome back!

I would try adding libpq-dev to a packages.txt file, which will install Postgres development headers on the image. Often times, when database drivers don’t work, it’s because it’s trying to call an underlying C library.

Best,
Randy