i’m trying to install psycopg2-binary but when i do it via ansible it attempts to install from source, even though i’m outright requesting the binary package
from the terminal, the following works just fine and installs the binary package sudo pip3 install psycopg2-binary
when using the pip module it attempts to install from source and then cries about dependencies it can’t find.
This isn’t just CentOS, I think. psycopg has native dependencies, so to build from source (which is what pip does), the PostgreSQL development libraries need to be there. (The C headers, maybe? I don’t know much about compiling native code.)
thanks gundalow! being sort of a noob i just followed all the instructions i saw online which directed install using pip. installing with dnf never occurred to me.
that did resolved the issue.
i’m still rather confused why manual pip at the terminal installs the binary version fine while calling pip via ansible installs from source if anyone has an answer for that
If you run pip directly on the system it will likely fail as well. From that stackoverflow article is seems like the package is always built from source, so your system is likely missing some other dependencies.
if i run pip directly on the system it works just fine, that’s where my confusion comes in. i did look at the article and noted they were having the issue running pip directly but that is not the case in my situation. guess it will remain an unsolved mystery. thanks again for the workaround.