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

psycopy2-2.8.1 libpq.so.5: cannot open shared object file: No such file or directory #892

Closed
EricCheung3 opened this issue Apr 9, 2019 · 3 comments

Comments

@EricCheung3
Copy link

When updating the psycopg2 library to the latest version, we got this error:
Downloading https://files.pythonhosted.org/packages/52/be/f898e712f5f08131d651a62754fca82a1deb42e4e9889ad01932f770a2be/psycopg2-2.8.1.tar.gz (367kB)
Complete output from command python setup.py egg_info:
running egg_info
creating pip-egg-info/psycopg2.egg-info
writing pip-egg-info/psycopg2.egg-info/PKG-INFO
writing dependency_links to pip-egg-info/psycopg2.egg-info/dependency_links.txt
writing top-level names to pip-egg-info/psycopg2.egg-info/top_level.txt
writing manifest file 'pip-egg-info/psycopg2.egg-info/SOURCES.txt'
Error: b'You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.\n'

We installed libqp-dev, this problem was solved, but when testing our function, we got this error
unable to import module libpq.so.5: cannot open shared object file: No such file or directory

But everything works very well before version psycopy2-2.8.1.
Now we are forcing to use version 2.7.7 or 2.7.5 to avoid the issue.

Does anyone have the similiar problem? or how to avoid the prob by using the latest version?

Update our command from "pip install psycopg2" to "pip install psycopg2-binary", is this what we should do?

Many thanks!!!

@EricCheung3
Copy link
Author

I tried using "pip install psycopg2-binary", after installed, when we tested it, we got this error: No module named 'psycopg2._psycopg'.

@dvarrazzo
Copy link
Member

pip uninstall both psycopg2 and psycopg2-binary, then install psycopg2-binary.

@arkha98
Copy link

arkha98 commented Mar 14, 2021

still got output same error

ReubenFrankel added a commit to Matatika/tap-meltano that referenced this issue Jan 18, 2024
ReubenFrankel added a commit to Matatika/tap-meltano that referenced this issue Jan 18, 2024
* Upgrade to the latest SDK version; drop support for Python 3.6 and relax upper version constraint

* Remove `tap-meltano.sh`

* Add test environment to `meltano.yml`

* Use `psycopg2-binary`

psycopg/psycopg2#892 (comment)

* Use SDK version `0.33` for compatibility with tests

* Fix test
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

3 participants