3 ms·
Delighted to see this. Installation of psycopg2 can be a nuisance thanks to the native compilation steps which don't always work as planned and rely on specific
by bencollier49 5y ago
Delighted to see this. Installation of psycopg2 can be a nuisance thanks to the native compilation steps which don't always work as planned and rely on specific versions of libssl.
- deleted 5y ago[deleted]
- gjvc 5y agoexactly my motivation for ferreting it out and it's worked great for the simple scenarios. the only thing i'm missing is a .mogrify() function. this guy has put one together though; might see if we can get it migrated into the original version. https://github.com/realazthat/aiopg8000/blob/master/aiopg8000/mogrify.py https://github.com/realazthat/aiopg8000/blob/master/aiopg800...
- bogcotton 5y agoAfter suffering with this myself, I started using the psycopg2-binary package exclusively: https://pypi.org/project/psycopg2-binary/ https://pypi.org/project/psycopg2-binary/ Haven't had any issues since!
- gjvc 5y agogood to hear, but beware what it says in the last paragraph here https://pypi.org/project/psycopg2/ https://pypi.org/project/psycopg2/ ... "The binary package is a practical choice for development and testing but in production it is advised to use the package built from sources." ...or use one from your operating system distribution.
- SonOfLilit 5y agoTo all those wondering _why_ that is the recommendation, I did some digging and the answer is "the binary package is compiled against one version of libssl, and if your system happens to use a different one, in some weird edge cases it will lead to a segfault"
- sirsinsalot 5y agoOdd then that Digital Ocean's App Platform for Django deployment requires the binary version in your requirements file.