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.

Problems instally pgcli from source

See original GitHub issue

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

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
j-bennetcommented, Feb 21, 2022

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

https://github.com/dbcli/pgcli/issues/844 https://github.com/dbcli/pgcli/issues/849 https://github.com/dbcli/pgcli/issues/974 https://github.com/dbcli/pgcli/issues/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.

1reaction
dvarrazzocommented, Jul 26, 2021

This should be solved with psycopg 2.9 (https://github.com/psycopg/psycopg2/issues/1200)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Install - pgcli
The easiest way install pgcli on an macOS machine is to use Homebrew. ... If the above command returns an error, then you...
Read more >
dbcli/pgcli - Gitter
Hi everyone ! I have a little problem with pgcli , currently when I log with psql on PostgreSQL, he ask my password,...
Read more >
python 3.x - ImportError: No module named 'psycopg2._psycopg'
pip install psycopg2. On Windows I add the prefix ('python -m') to the commands above. I think the problem occurs when you change...
Read more >
Installation — Psycopg 2.9.5 documentation
x, pip install psycopg2 would have tried to install automatically the binary package of Psycopg. Because of concurrency problems binary packages have displayed, ......
Read more >
ModuleNotFoundError: No module named 'pgcli' - RoseIndia.Net
pip install pgcli. After the installation of pgcli python library, ModuleNotFoundError: No module named 'pgcli' error will be solved. Thanks. Post Answer.
Read more >

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