GitHub user tickwong added a comment to the discussion: Issue in psycopg2 while 
upgrading from 4.x to 5.0

this is my Dockerfile below:
--
FROM apache/superset:v5.0.0

USER root

ENV DEBIAN_FRONTEND=noninteractive

WORKDIR /app

RUN apt-get update && \
    apt-get install -y --no-install-recommends \
        python3-pip python3-dev \
        git curl wget bash unzip locales \
        fonts-wqy-zenhei \
        pkg-config gcc libmariadb-dev-compat libmariadb-dev libpq-dev \
        net-tools iputils-ping && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN apt-get update && \
    wget -q 
https://chrome-versions.com/google-chrome-stable-113.0.5672.63-1.deb && \
    apt-get install -y --no-install-recommends 
./google-chrome-stable-113.0.5672.63-1.deb && \
    rm -f google-chrome-stable-113.0.5672.63-1.deb

ENV CHROMEDRIVER_VERSION 113.0.5672.63
RUN wget -q 
https://chromedriver.storage.googleapis.com/${CHROMEDRIVER_VERSION}/chromedriver_linux64.zip
 && \
    unzip chromedriver_linux64.zip -d /usr/bin && \
    chmod 755 /usr/bin/chromedriver && \
    rm -f chromedriver_linux64.zip

RUN pip install --upgrade pip && \
    pip install --no-cache-dir gevent psycopg2-binary redis pydoris pymysql

RUN uv pip install --no-cache-dir gevent psycopg2-binary redis pydoris pymysql


USER superset

----
when i using this to docker build and then docker-compose -f 
docker-compose.yaml up -d, 
with the answer by dosubot said "The reason /app/.venv/bin/uv isn't found is 
that in Superset 5.0.0, uv is installed system-wide, not inside the virtual 
environment. You should just call uv directly, not with a path."
but still show:
  "File 
"/app/.venv/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/psycopg2.py",
 line 811, in dbapi
    import psycopg2
ModuleNotFoundError: No module named 'psycopg2'"
also gevent with the same error , so how to fix ?


GitHub link: 
https://github.com/apache/superset/discussions/34109#discussioncomment-13773829

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: 
notifications-unsubscr...@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to