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

Consider requiring psycopg2-binary instead of psycopg2 #12

Open
CaselIT opened this issue Apr 4, 2019 · 7 comments · May be fixed by #14
Open

Consider requiring psycopg2-binary instead of psycopg2 #12

CaselIT opened this issue Apr 4, 2019 · 7 comments · May be fixed by #14

Comments

@CaselIT
Copy link

CaselIT commented Apr 4, 2019

psycopg2 version 2.8 no longer includes the binary wheels, and it is built on install. This can cause problems, like when using this package in a docker image

Thanks

@brianmaissy
Copy link

Just pointing out that then other projects which use psycopg2, and also depend on sqlalchemy-postgres-copy, will now depend on both psycopg2 and psycopg2-binary, which could break things.

@CaselIT
Copy link
Author

CaselIT commented Apr 12, 2019

@brianmaissy indeed.

After reading a bit more here psycopg/psycopg2#674, it seems to be a common problem.
I guess the best solution would be to remove the dependency altogether and add a clearer error than the default ImportError if an user tries to use this library without psycopg2

@CaselIT
Copy link
Author

CaselIT commented Apr 12, 2019

which could break things.

It the moment I'm installing both and I haven't encountered any problem. But it is hardly the optimal solution..

@brianmaissy
Copy link

I think if you install both one will overwrite the other. Which is fine as long as you don't care which one is installed, and both are of the same version.

@svisser
Copy link

svisser commented Apr 15, 2019

It might break when it tries to build psycopg2 though.

@CaselIT
Copy link
Author

CaselIT commented Apr 15, 2019

@svisser that is the original issue. I was having problem building psycopg2 in docker because I do not have postgress installed in the image (nor do I want to)

@rsemihkoca
Copy link

I had same problem. Re-installing psycopg2 using conda instead of using pip resolved the issue.

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