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.

psycopg2-binary not adequate for `import psycopg2` when `poetry add --path`

See original GitHub issue
  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • OS version and name: macOS 10.13.6
  • Poetry version: 0.11.5

Issue

I am trying to use either peewee or SQLAlchemy for PostGRES.

When testing inside the package, installing only psycopg2-binary works fine. But when I need to use it in my another project, like

poetry add imserv --path ../imserv

It complains that I don’t have psycopg2 installed.

Now, I can installed psycopg2 to resolve the issue, but it comes with a warning.

UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>.

“”")

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:21 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
patarapolwcommented, Oct 12, 2018

I can install psycopg2, but it gives a warning on every first usage in a script. psycopg2-binary gives no warning.

4reactions
olly-writes-codecommented, Nov 15, 2019

So you can still have psycopg2 as a dependency and install from poetry but you need to make sure the build requirements are satisfied as stated in - http://initd.org/psycopg/docs/install.html#build-prerequisites

This should be closed as this is out of poetry’s control.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installation — Psycopg 2.9.5 documentation
pip install psycopg2-binary. This will install a pre-compiled binary version of the module which does not require the build or runtime prerequisites ...
Read more >
Error Installing Psycopg2 on MacOS 10.9.5 - Stack Overflow
I ran pip install psycopg2-binary and it worked like charm ... if the /usr/local/bin directory is present in your path and add it...
Read more >
Developers - psycopg2-binary not adequate for `import ...
[x] I am on the latest Poetry version. [x] I have searched the issues of this repo and believe that this is not...
Read more >
installing psycopg2-binary (2.9.3): failed - You.com
1) I tried --additional-python-modules method to import psycopg2-binary, ... not adequate for `import psycopg2` when `poetry add --path`#483.
Read more >
[Fixed] ModuleNotFoundError: No module named 'psycopg2 ...
The most frequent source of this error is that you haven't installed psycopg2-binary explicitly with pip install psycopg2-binary . Alternatively, you may have ......
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