Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

psycopg2 dependency #107

Closed
xaniasd opened this issue Mar 31, 2021 · 4 comments
Closed

psycopg2 dependency #107

xaniasd opened this issue Mar 31, 2021 · 4 comments

Comments

@xaniasd
Copy link

xaniasd commented Mar 31, 2021

Hi! I wanted to install pgspecial for a local test using pip, which is trying to build psycopg2. Is using psycopg2-binary instead an option?

thanks!

@seperman
Copy link

I'm in the same boat. Building psycopg2 is a pain. It is much easier to pip install psycopg2-binary.

@BigJerBD
Copy link

BigJerBD commented Jul 6, 2021

+1 , If there no reason to use the non-binary version, using psycopg2-binary would really simplify using this dependency projects

@j-bennet
Copy link
Contributor

j-bennet commented Jul 23, 2021

Unfortunately, psycopg2 does not recommend using binary distribution as depencency for other packages:

If you are the maintainer of a published package depending on psycopg2 you shouldn’t use psycopg2-binary as a module dependency. For production use you are advised to use the source distribution.

The binary packages come with their own versions of a few C libraries, among which libpq and libssl, which will be used regardless of other libraries available on the client: upgrading the system libraries will not upgrade the libraries used by psycopg2. Please build psycopg2 from source if you want to maintain binary upgradeability.

https://www.psycopg.org/docs/install.html#psycopg-vs-psycopg-binary

However, it is still possible to install and use psycopg2-binary. If psycopg2-binary is installed, but psycopg2 is not, pgcli / pgspecial will work just fine.

@j-bennet
Copy link
Contributor

Related: dbcli/pgcli#844

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants