psycopg / psycopg2

PostgreSQL database adapter for the Python programming language
https://www.psycopg.org/
Other
3.31k stars 503 forks source link

Fails to execute in an Azure Function #1683

Closed DomRoberts closed 6 months ago

DomRoberts commented 6 months ago

Please complete the following information:

I build my application on Github Actions and then deploy it to a Function app in Azure. When I execute the code that imports psycopg2.sql then an exception is thrown ImportError: libpq.so.5: cannot open shared object file: No such file or directory.

Having investigated this online I have installed psycopg2-binary and removed psyopg2. When that happens I get a more immediate error of psycopg2 module not found error. I have tried it with and without Psycopg2 installed and always the same result. Psycopg2 doesn't seem to work correctly when installed on an Azure Function

dvarrazzo commented 6 months ago

I don't know about Azure functions. They are not free software, so I cannot spend time looking for a solution for free. Feel free to reach out for a private consultancy.