Closed marcosfelt closed 1 year ago
Did you set up your PostgreSQL? You will need to set up pg_config
for your machine if using pip, I guess. https://stackoverflow.com/questions/11618898/pg-config-executable-not-found. I think for setting up a local working environment, pyscog2-binary
would be OK. But for deployment, maybe better to use psycog2, https://www.psycopg.org/docs/install.html#:~:text=psycopg%20vs%20psycopg%2Dbinary,binary%20as%20a%20module%20dependency.
If you are using conda
for virtual envionment management, you can try conda install psycopg2
, which worked on my Linux machine.
@marcosfelt
Thanks, I will give this a try. Also, is Postgres a necessary install? Could it be made optional for the ORM? I figure this is a barrier for a lot of people.
If you are in a Linux machine, I think the easiest way is to install postgres with conda
. Otherwise, you may want to explore other options to have a system-wide Postgress installed, which is not so enjoyable. @marcosfelt
Right. The issue here is that you need psycopg2 instead of psycopg2-binary; the former requires that you have the postgres dev headers installed so you can compile the module locally.
As a workaround, you can install psycopg2-binary and it will automagically serve as a drop-in replacement for psycopg2.
More details: https://www.psycopg.org/docs/install.html#psycopg-vs-psycopg-binary
Describe the bug Installing on Mac OS X and Linux fail due to use of pyscog2
To Reproduce
Additional context I think it would be better to use pyscog2-binary here: https://www.psycopg.org/docs/install.html