You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use this in a PyPy environment with psycopg2cffi installed; however, I get this error:
File "project/lib/foo/src/foo/foo.py", line 5, in <module>
from aiopg.sa.engine import Engine
File "/usr/local/site-packages/aiopg/__init__.py", line 6, in <module>
from .connection import connect, Connection, TIMEOUT as DEFAULT_TIMEOUT
File "/usr/local/site-packages/aiopg/connection.py", line 12, in <module>
import psycopg2
ModuleNotFoundError: No module named 'psycopg2'
If I try to do the psycopg2cffi.compat.register() monkeypatch thing, I get this error:
Fatal error on aiopg connection: POLL_ERROR from underlying .poll() call\nconnection: <aiopg.connection.Connection object at 0x00000000085ce4f0>
Are there instructions for installing into PyPy (if so, apologies for missing them)? Am I doing something wrong? Or maybe this simply isn't supported?
The text was updated successfully, but these errors were encountered:
PYPY=/path/to/pypy
PYPY_PIP=/path/to/pypy/pip
$PYPY -m ensurepip
$PYPY -m pip install --upgrade pip
$PYPY_PIP install psycopg2cffi
$PYPY_PIP install aiopg # succeeds, even though it installs a broken psycopg2-binary
Then, on pypy program startup:
import sys
import psycopg2cffi as psycopg2
sys.modules['psycopg2'] = psycopg2
import aiopg # this imports psycopg2cffi masquerading as psycopg2, and now works
(update -- this is tested and working in PyPy 3.9)
I'm trying to use this in a PyPy environment with psycopg2cffi installed; however, I get this error:
If I try to do the
psycopg2cffi.compat.register()
monkeypatch thing, I get this error:Are there instructions for installing into PyPy (if so, apologies for missing them)? Am I doing something wrong? Or maybe this simply isn't supported?
The text was updated successfully, but these errors were encountered: