Skip to content

Commit

Permalink
only recommend psycopg[binary] package (#1157)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
masenf authored Dec 19, 2024
1 parent b6e2cc5 commit 3822e24
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
9 changes: 1 addition & 8 deletions errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
reflex-pyplot==0.1.3

0 comments on commit 3822e24

Please sign in to comment.