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

Problems instally pgcli from source #1085

Closed
gustavopinto opened this issue Aug 4, 2019 · 5 comments
Closed

Problems instally pgcli from source #1085

gustavopinto opened this issue Aug 4, 2019 · 5 comments

Comments

@gustavopinto
Copy link

Description

I was reading the tutorial, trying to installing pgcli from the source code.

During the pip installation (pip install -e .), I received the following error:

ld: library not found for -lssl

clang: error: linker command failed with exit code 1 (use -v to see invocation)

error: command 'cc' failed with exit status 1

After googling a bit, I found this StackOverflow question. I tried most of the answers (openssl and xcode were installed and updated), but this answer turns out to solve the problem.

I'm reporting this because I'm not sure this is a known problem (or if it's a problem after all).

Your environment

  • I'm using macOS, version 10.14.4
  • I'm using Terminal, version 2.9.4 (421.1.1)
  • Output of pip freeze command.

aspy.yaml==1.3.0
attrs==19.1.0
autopep8==1.3.3
behave==1.2.6
certifi==2019.6.16
cfgv==2.0.1
chardet==3.0.4
click==6.7
codecov==2.0.15
coverage==4.3.4
docutils==0.15.2
filelock==3.0.12
identify==1.4.5
idna==2.8
importlib-metadata==0.19
mock==3.0.5
nodeenv==1.3.3
packaging==19.1
parse==1.12.0
parse-type==0.5.2
pexpect==3.3
pkginfo==1.5.0.1
pluggy==0.12.0
pre-commit==1.17.0
py==1.8.0
pycodestyle==2.5.0
pyparsing==2.4.2
pytest==3.0.7
PyYAML==5.1.2
requests==2.22.0
requests-toolbelt==0.9.1
six==1.12.0
toml==0.10.0
tox==3.13.2
tqdm==4.32.2
twine==1.11.0
urllib3==1.25.3
virtualenv==16.7.2
zipp==0.5.2

@amjith
Copy link
Member

amjith commented Aug 5, 2019

I haven't personally encountered this issue but I develop using Linux.

There's an internal discussion going on about using psycopg2-binary instead of psycopg2 for pgcli. Hopefully this won't be a long term issue.

/cc @j-bennet

@dvarrazzo
Copy link
Collaborator

This should be solved with psycopg 2.9 (psycopg/psycopg2#1200)

@j-bennet j-bennet closed this as completed Aug 2, 2021
@hayd
Copy link

hayd commented Jan 20, 2022

@amjith is there an open issue on using psycopg2-binary instead of psycopg2 for pgcli?

@j-bennet
Copy link
Contributor

@hayd We discussed switching to binary / source in a few issues:

#844
#849
#974
#1036

This is beyond me why (there's a huge discussion here but I still think they should have kept one package and let --binary-only and --no-binary flags do the work), but the psycopg2 documentation still states:

If you are the maintainer of a published package depending on psycopg2 you shouldn’t use psycopg2-binary as a module dependency. For production use you are advised to use the source distribution.

Ugh, ugh and ugh. We have so many people experiencing issues with the source package. I wish we could have a way for users to choose either psycopg2 or psycopg2-binary, but there's no such way with pip.

It is possible to install and use pgcli with psycopg2-binary if you do this:

pip install pgcli
pip uninstall psycopg2
pip install psycopg2-binary

Unfortunarely, this workaround will only work if you are able to install psycopg2.

I'm going to create a branch switching pgcli to psycopg3. Maybe this will help us leave the binary/source mess behind.

@dvarrazzo
Copy link
Collaborator

I'm going to create a branch switching pgcli to psycopg3. Maybe this will help us leave the binary/source mess behind.

That would be amazing. Psycopg 3 has a base pure python package and can work either with a -binary add-on or on its own, provided that the libpq is on the system (which means, basically, that psql is on the system, so it doesn't seem so much of a burden as a request).

Info in the docs. If you need some help just ask away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants