Comments (8)
I get a slightly different error on OSX 10.10, using Python 2.7 and Postgresql 9.2.4.
~ $pgcli --help
Traceback (most recent call last):
File "/usr/local/bin/pgcli", line 5, in <module>
from pkg_resources import load_entry_point
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in <module>
working_set.require(__requires__)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require
needed = self.resolve(parse_requirements(requirements))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: Click
from pgcli.
@rpoole Can you tell me how you're launching pgcli? What are the command line params?
It looks like the database connection is failing. I should report a more sensible error message for that.
from pgcli.
@sillypog Your error message is because Click
is not installed. Click
is a dependency of pgcli
that should be installed when you do a pip install pgcli
.
Can you tell me how you installed pgcli?
from pgcli.
Hi @amjith, thanks a lot for this project!
I get the same error as @sillypog, and I did install pgcli
using pip
.
Here's the output:
$ pgcli
Traceback (most recent call last):
File "/usr/local/bin/pgcli", line 5, in <module>
from pkg_resources import load_entry_point
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in <module>
working_set.require(__requires__)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require
needed = self.resolve(parse_requirements(requirements))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: Click
$ pip install pgcli
Requirement already satisfied (use --upgrade to upgrade): pgcli in /Library/Python/2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): Click in /Library/Python/2.7/site-packages (from pgcli)
Requirement already satisfied (use --upgrade to upgrade): prompt-toolkit in /Library/Python/2.7/site-packages (from pgcli)
Requirement already satisfied (use --upgrade to upgrade): psycopg2 in /Library/Python/2.7/site-packages (from pgcli)
Requirement already satisfied (use --upgrade to upgrade): sqlparse in /Library/Python/2.7/site-packages (from pgcli)
Requirement already satisfied (use --upgrade to upgrade): docopt in /Library/Python/2.7/site-packages (from prompt-toolkit->pgcli)
Requirement already satisfied (use --upgrade to upgrade): jedi>=0.8.1 in /Library/Python/2.7/site-packages (from prompt-toolkit->pgcli)
Requirement already satisfied (use --upgrade to upgrade): pygments in /Library/Python/2.7/site-packages (from prompt-toolkit->pgcli)
Requirement already satisfied (use --upgrade to upgrade): six>=1.8.0 in /Library/Python/2.7/site-packages (from prompt-toolkit->pgcli)
Requirement already satisfied (use --upgrade to upgrade): wcwidth in /Library/Python/2.7/site-packages (from prompt-toolkit->pgcli)
Cleaning up...
$ which python
/usr/bin/python
$ pip freeze | grep 'click\|pgcli'
click==3.3
pgcli==0.10.0
It seems that pgcli
and click
were installed successfully, but it still doesn't work.
Any idea why?
Thanks in advance.
from pgcli.
@sillypog @thiagophx Let's track this issue on #27. The original issue reported by @rpoole seems unrelated to the ones you guys are facing.
from pgcli.
@rpoole Which psycopg version you're using? Context Manager support in cursor was added in 2.5 http://pythonhosted.org//psycopg2/news.html#what-s-new-in-psycopg-2-5
from pgcli.
@cezio that was it! I had an old version of psycopg2 (2.4.5).
Thanks for the help and the hard work on the tool - it looks great!
from pgcli.
Version 0.10.1 released to PyPI. https://pypi.python.org/pypi/pgcli/0.10.1
from pgcli.
Related Issues (20)
- How to change default key bindings / hotkeys or assign new bindings HOT 4
- syntax error at or near "$" in parameter aggregation in named queries HOT 2
- Is it ok to add pgcli as 1password shell plugin? HOT 4
- Enhancement suggestion: inverted SELECT statements HOT 1
- Support `PGAPPNAME` for setting `application_name` HOT 1
- Connecting via unix socket on a specific DB crashes pgcli HOT 3
- pgcli disconnects when closing pager with `q` HOT 3
- Output to file in addition to the pager?
- Named Queries more user firendly
- [feature request] Unicode table HOT 1
- Using environment variables to connect via ssh HOT 2
- pgcli 4.0 - ModuleNotFoundError: No module named 'six' HOT 7
- pgcli.magic `conn.session.engine.url` raises AttributeError after breaking change upstream in ipython-sql
- Raised notices are printed backwards HOT 3
- Segfault on MacOs HOT 2
- Doesn't work with Python 3.11/Windows HOT 6
- Tab completion not working in version 4.0.1 on macOS
- pendulum dependency cannot be installed on 32-bit arches HOT 4
- Autocomplete not working for Apache AGE extension function names HOT 1
- Boolean type always show `false` HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pgcli.