Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change dependency from psycopg2 to psycopg2-binary #15

Closed
ShukriChiu opened this issue Dec 1, 2023 · 4 comments · Fixed by #19 or timescale/docs#3165
Closed

change dependency from psycopg2 to psycopg2-binary #15

ShukriChiu opened this issue Dec 1, 2023 · 4 comments · Fixed by #19 or timescale/docs#3165
Assignees

Comments

@ShukriChiu
Copy link

I want to deploy a Streamlit app, but I encountered an error: 'Error: pg_config executable not found,' while trying to install psycopg2. Although I switched to psycopg2-binary, the dependency on timescale-vector still requires psycopg2, which continues to cause a deployment error.

@mcr-kaes
Copy link

mcr-kaes commented Dec 5, 2023

I am running into the same issue when I build a docker container.

@jgpruitt
Copy link
Collaborator

jgpruitt commented Dec 7, 2023

The timescale-vector package explicitly depends on psycopg2 (the non-binary version). This adheres to the advice provided by psycopg2:

If you are the maintainer of a published package depending on psycopg2 you shouldn’t use psycopg2-binary as a module dependency. For production use you are advised to use the source distribution.

Building psycopg from source requires a few prerequisites to be installed. Make sure these are installed before trying to pip install timescale-vector

@jgpruitt jgpruitt self-assigned this Dec 7, 2023
@cevian
Copy link
Collaborator

cevian commented Jan 5, 2024

@ShukriChiu I believe you may need to add libpq-dev to packages.txt at the root of your streamlit app.

@mcr-kaes Similarly try running apt install libpq-dev

@jgpruitt jgpruitt reopened this Apr 24, 2024
@jgpruitt
Copy link
Collaborator

Add this information to the README

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants