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.

Not sure about psycopg2-wheels dependency

See original GitHub issue

Hello, I’m psycopg2 maintainer.

I have developed wheel package of psycopg as a way to make tools like yours easier to install, but unfortunately the psycopg2 wheels has complex problems hard or impossible to eliminate, which forced us, in order to not get rid altogether of the wheel, to deploy them under a different pip name, as you have found seeing the requirements in your setup.py.

In psycopg/psycopg2#674 someone has reported though that the dependencies of pgcli cause problems to shared virtual envs. My suggestion would be to not have pgcli installed in the share virtualenv of other projects as it’s a standalone executable, not a library. However I’m not sure about that. The existence of a -wheel package is a new strategy for us so I’d like to find the best way to tackle the problem.

Do you think there are scenarios where pgcli is meant to be installed as a Python library for other projects? If so how can we solve conflicts where other projects depend on the naked psycopg2? Glad to know your opinion.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:1
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
bersacecommented, Mar 8, 2018

@dvarrazzo how do you manage a OR dependency with setuptools ? Something like psycopg2 | psycopg2-binary ? How to let user choose whether they use binary or build from source ?

0reactions
Zebradilcommented, Apr 22, 2019

I didn’t get it. Why we can’t just do the following?

diff --git a/setup.py b/setup.py
index 13c76c02..f4f11921 100644
--- a/setup.py
+++ b/setup.py
@@ -16,7 +16,7 @@ install_requirements = [
     'click >= 4.1',
     'Pygments >= 2.0',  # Pygments has to be Capitalcased. WTF?
     'prompt_toolkit>=2.0.6,<2.1.0',
-    'psycopg2 >= 2.7.4,<2.8',
+    'psycopg2 >= 2.7.4',
     'sqlparse >=0.2.2,<0.3.0',
     'configobj >= 5.0.6',
     'humanize >= 0.5.1',

I haven’t noticed any problems with the latest psycopg2 so far.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installation — Psycopg 2.9.5 documentation
The psycopg2 wheel package comes packaged, among the others, with its own libssl binary. This may create conflicts with other extension modules binding...
Read more >
How to solve ERROR: Failed building wheel for psycopg2?
I'm not quite sure why there is a Building wheels for collected packages: psycopg2 even if psycopg2 is commented out in my requirements.txt....
Read more >
Installation - Psycopg 2.8.6 documentation
The psycopg2 wheel package comes packaged, among the others, with its own libssl binary. This may create conflicts with other extension modules binding...
Read more >
12989 (Make psycopg2-binary satisfy installation requirements)
7/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary ...
Read more >
Installing Python dependencies - AWS Documentation
A Python dependency is any package or distribution that is not included in the Apache ... Python wheels ( .whl ), or Python...
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