question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

move to `psycopg2-binary`?

See original GitHub issue

Description

I tried to install your package from pip and got a usual Error: pg_config executable not found. because I don’t have libpq or postgres-devel packages.

I cloned your repo, replaced psycopg2 >= 2.7.4 with psycopg2-binary and installed it with python setup.py install command. It works like a charm and not requires postgres stuff now.

How about to move to psycopg2-binary?

Your environment

  • Please provide your OS and version information. OS: Manjaro 18.0.4 Illyria Kernel: x86_64 Linux 5.1.16-1-MANJARO
  • Please provide your CLI version. pgcli==2.1.1
  • What is the output of pip freeze command. Clean virtualenv with pgcli==2.1.1 installed

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
nvarscarcommented, Aug 13, 2019

This one worked for me as a workaround:

pip install pgcli --only-binary psycopg2
0reactions
ddimmichcommented, Sep 4, 2019

Interestingly psycopg2 recommends not using the binary version for production: http://initd.org/psycopg/docs/install.html#binary-install-from-pypi

If you are the maintainer of a publish 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.

Note

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.

This makes sense, as annoying as it is.

Read more comments on GitHub >

github_iconTop Results From Across the Web

psycopg2-binary - PyPI
Psycopg is the most popular PostgreSQL database adapter for the Python programming language. Its main features are the complete implementation of the Python ......
Read more >
PostgreSQL Python Libraries: psycopg2 and psycopg2-binary
When that's created, you'll have a new virtual environment based off the "Base interpreter" that you selected. Now we can go to the...
Read more >
How to use psycopg2-binary in Python? - Stack Overflow
I'm using Django on a Mac. This is what worked for me. In my virtual environment I ran: pip install psycopg2-binary.
Read more >
How to Install psycopg2 Binary Module in Python
Step 2: Open the command prompt and run the below command to install psycopg2-binary. If it shows successfully installed then you are good...
Read more >
Basic module usage — Psycopg 2.9.5 documentation
Python types representing binary objects are converted into PostgreSQL ... in PostgreSQL using the DECLARE command and subsequently handled using MOVE ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found