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:
- Created 5 years ago
- Comments:21 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I can install
psycopg2
, but it gives a warning on every first usage in a script.psycopg2-binary
gives no warning.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.