Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting pgcli to work on Windows 7 #974

Closed
3 tasks
tinmanjk opened this issue Nov 28, 2018 · 7 comments
Closed
3 tasks

Getting pgcli to work on Windows 7 #974

tinmanjk opened this issue Nov 28, 2018 · 7 comments

Comments

@tinmanjk
Copy link

Description

I am not able to install pgcli via pip on Windows.
I have tried to install a binary of psycopg2 (as suggested in issue #108) in advance but to no avail.
Does anybody have a step-by-step guide on how to do that?

Your environment

  • Please provide your OS and version information.
    Windows 7 64bit
  • Please provide your CLI version.
  • What is the output of pip freeze command.
@j-bennet
Copy link
Contributor

What kind of error are you getting?

@tinmanjk
Copy link
Author

tinmanjk commented Nov 28, 2018

This should be it:
running install
running build
running build_ext
building 'setproctitle' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools

Just wondered if there is a general solution lurking somewhere and not just hints that it is possible.

@j-bennet
Copy link
Contributor

Yes, newer versions of pgcli bumped psycopg requirement to psycopg2 >= 2.7.4,<2.8:

pgcli/setup.py

Line 19 in 3b9041f

'psycopg2 >= 2.7.4,<2.8',

and I don't see any binaries for that in linked issue (previously the problem was solved with binaries from http://www.stickpeople.com/projects/python/win-psycopg/).

@dbcli/pgcli-core Any of you use Windows / able to help?

@meeuw
Copy link
Contributor

meeuw commented Nov 30, 2018

I haven't tried it but I'd recommend https://www.anaconda.com/download/#windows

Which includes a compiled version of psycopg2 (https://docs.anaconda.com/anaconda/packages/py3.6_win-64/)

After installing anaconda you should start an "Anaconda Prompt"
https://conda.io/docs/user-guide/getting-started.html

And run the following command:
pip install pgcli

Then you should be able te start pgcli from the same anaconda prompt.

@tinmanjk
Copy link
Author

tinmanjk commented Dec 1, 2018

Thanks for the suggestion. Was hoping for something 'simpler' though.

@dbaty
Copy link
Member

dbaty commented Mar 5, 2024

Commit 96eb37f changed the requirement to psycopg2-binary on Windows, which should fix the installation. (I don't use Windows and I cannot confirm.) This (old and not very detailed) issue can be closed once a new version of pgcli is released with that change.

@dbaty
Copy link
Member

dbaty commented May 23, 2024

The aforementioned fix has been included in version 4.1.0 of pgcli. I am closing this.

@dbaty dbaty closed this as completed May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants