The 'psycopg2<2.8,>=2.7.4' distribution was not found
See original GitHub issueDescription
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:
- Created 4 years ago
- Reactions:4
- Comments:5 (2 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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
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.