PyPy kullanırken PostgreSQL bağlantısı için psycopg2 kullanıyorsanız, Database bağlantısı sırasında aşağıdaki hatayı alırsınız çünkü CPython derlemede henüz psycopg2 için destekleri yok. Onun yerine psycopg2cffi kullanmanız ve compat egsiter kullanmanız gerekir.
psycopg2/_psycopg.pypy38-pp73-x86_64-linux-gnu.so: undefined symbol: PyInterpreterState_Main
rm -rf /usr/bin/pypy3 /usr/local/bin/pypy3 /usr/bin/pypip* /usr/local/bin/pypip* /opt/pypy*
wget https://downloads.python.org/pypy/pypy3.8-v7.3.8-linux64.tar.bz2 && tar -x -C /opt -f pypy3.8-v7.3.8-linux64.tar.bz2 && mv /opt/pypy3.8-v7.3.8-linux64/ /opt/pypy
ln -s /opt/pypy/bin/pypy3 /usr/bin/pypy3
ln -s /opt/pypy/bin/pypy3 /usr/local/bin/pypy3
wget -q https://bootstrap.pypa.io/get-pip.py -O get-pip.py && pypy3 get-pip.py pip --no-warn-script-location
ln -s /opt/pypy/bin/pip3.8 /usr/bin/pypip3.8
ln -s /opt/pypy/bin/pip3.8 /usr/local/bin/pypip3.8
pypip3.8 install -U cryptography fastapi pyjwt hypercorn sqlalchemy psycopg2 psycopg2-binary psycopg2cffi
####################################################
####################################################
from psycopg2cffi import compat
compat.register()
####################################################
####################################################