Install PostgreSQL client#
To connect to a PostgreSQL database from Python, you need a client library. We recommend using
psycopg2, but there are others like
asyncpg. JupySQL supports the following connectors.
The simplest way to install
psycopg2 is with the following command:
pip install psycopg2-binary
If you have
conda installed, it is more reliable to use it:
conda install psycopg2 -c conda-forge
Ensure that you are using
pgspecial 2.x has migrated to
psycopg3 and thus does not yield informative error messages.
conda install "pgspecial<2" -c conda-forge
If you have trouble getting it to work, message us on Slack.