From 92f26eca3dc6ed7f9ee35810d4226d9a577f44b8 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Thu, 19 Dec 2024 10:37:30 -0800 Subject: [PATCH] only recommend `psycopg[binary]` package this is the only package needed to successfully access a postgres db. i've confirmed this in `form-designer` and `rx-shout`, both of which use postgres and neither of which install anything other than this library in a fresh docker container or deploy. --- errors.md | 9 +-------- requirements.txt | 4 ++-- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/errors.md b/errors.md index 992c25d6a..d65f3621c 100644 --- a/errors.md +++ b/errors.md @@ -199,14 +199,7 @@ error_message( heading="ImportError: couldn't import psycopg", error_code="ImportError: couldn't import psycopg 'python' implementation: libpq library not found | couldn't import psycopg 'binary' implementation: No module named 'psycopg_binary' | couldn't import psycopg 'c' implementation: No module named 'psycopg_c'", solution=[ - h4_comp_error(text="This is caused by not installing the correct psycopg package. Solution is to add the following packages to your requirements.txt file."), - rx.el.ul( - rx.el.li("psycopg2-binary==2.9.9"), - rx.el.li("psycopg-binary==3.2.3"), -rx.el.li("psycopg==3.2.3"), -rx.el.li("psycopg-pool==3.2.3"), - class_name="list-disc pl-4", - ), + h4_comp_error(text="This is caused by not installing the correct psycopg package. Solution is to add the `psycopg[binary]==3.2.3` package to your requirements.txt file."), ], error_type="Import Error", ) diff --git a/requirements.txt b/requirements.txt index a9d915987..156ed44ab 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ email-validator==2.1.1 black==23.10.0 pandas>=1.5.3 -psycopg2-binary==2.9.9 +psycopg[binary]==3.2.3 plotly-express==0.4.1 googletrans-py==4.0.0 typesense==0.14.0 @@ -15,4 +15,4 @@ reflex-chat==0.0.2a1 reflex_type_animation==0.0.1 reflex-ag-grid==0.0.10 replicate==0.32.1 -reflex-pyplot==0.1.3 \ No newline at end of file +reflex-pyplot==0.1.3