Skip to content

Commit

Permalink
Require psycopg 3 uninstalled in Jupyter notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
yujiyokoo committed Nov 28, 2024
1 parent 2039f6e commit 84be5de
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions examples/python/jupyter_notebook/CipherStash-Getting-Started.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,18 @@
"metadata": {},
"source": [
"### Install dependency packages\n",
"As we will need to restart the Jupyter notebook kernel after installation, install `psycopg2`, `django` and `eqlpy` (from a specific branch):"
"As we will need to restart the Jupyter notebook kernel after installation, install `psycopg2`, `django` and `eqlpy` (from a specific branch).\n",
"Also, currently we only support psycopg2, not psycopg 3. Uninstall it if you have it:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "1afdc85e-20ec-442a-a1d0-5a00ca0d0cba",
"metadata": {},
"outputs": [],
"source": [
"%pip uninstall --yes psycopg eqlpy"
]
},
{
Expand Down Expand Up @@ -235,7 +246,7 @@
"metadata": {},
"outputs": [],
"source": [
"%env CS_CLIENT_ACCESS_KEY=<client_acces_key>"
"%env CS_CLIENT_ACCESS_KEY=<client_access_key>"
]
},
{
Expand Down Expand Up @@ -1085,7 +1096,7 @@
" ],\n",
" DATABASES={\n",
" \"default\": {\n",
" \"ENGINE\": \"django.db.backends.postgresql_psycopg2\",\n",
" \"ENGINE\": \"django.db.backends.postgresql\",\n",
" \"NAME\": \"cipherstash_getting_started\",\n",
" \"USER\": \"postgres\",\n",
" \"PASSWORD\": \"postgres\",\n",
Expand Down Expand Up @@ -1115,10 +1126,6 @@
"\n",
"import os\n",
"os.environ[\"DJANGO_ALLOW_ASYNC_UNSAFE\"] = \"false\"\n",
"# import asyncio\n",
"# from asgiref.sync import sync_to_async\n",
"#foo = await sync_to_async(Example.objects.all().delete)()\n",
"#print(foo)\n",
"\n",
"Example.objects.all().delete()\n",
"\n",
Expand Down

0 comments on commit 84be5de

Please sign in to comment.