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.

The 'psycopg2<2.8,>=2.7.4' distribution was not found

See original GitHub issue

Description

After update to pgcli 2.1.0-3 from AUR it doesn’t start anymore giving the error:

Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 583, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 791, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (psycopg2 2.8.1 (/usr/lib/python3.7/site-packages), Requirement.parse('psycopg2<2.8,>=2.7.4'), {'pgcli'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/pgcli", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3241, in <module>
    @_call_aside
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3225, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3254, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 585, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 598, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'psycopg2<2.8,>=2.7.4' distribution was not found and is required by pgcli

Your environment

I’m using Manjaro Linux, pgcli is installed from AUR and have version 2.1.0-3, psycopg version is 2.8.1

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
j-bennetcommented, Apr 9, 2019

@Zebradil Sure, you’re welcome to submit a PR to upgrade pgcli to psycopg2>=2.8. You may want to look at some related issues that talk about binary vs source package:

https://github.com/dbcli/pgcli/issues/849 https://github.com/dbcli/pgcli/issues/974 https://github.com/dbcli/pgcli/issues/844

1reaction
Zebradilcommented, Apr 9, 2019

Personally for me it’s not a problem or blocker (I’ve already downgraded it globally, because I use venvs for projects anyways). I just thought that it’d be nice for other users of pgcli to end up in this page and find the solution if they face the same issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

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