tickwong commented on issue #34185: URL: https://github.com/apache/superset/issues/34185#issuecomment-3208721061
yup, as dousubot said is correct : ---------------------- To fix this, update your Dockerfile so that after all system dependencies are installed, you install Python packages using the venv's pip or uv, like this: RUN /app/.venv/bin/uv pip install --no-cache-dir gevent psycopg2-binary redis pydoris pymysql Or, if you want to verify the install during build: RUN /app/.venv/bin/uv pip install --no-cache-dir gevent psycopg2-binary redis pydoris pymysql && \ /app/.venv/bin/python -c "import psycopg2, gevent" dosubot[bot] ***@***.***> 于2025年8月21日周四 05:42写道: > *dosubot[bot]* left a comment (apache/superset#34185) > <https://github.com/apache/superset/issues/34185#issuecomment-3208171533> > > The issue is that Superset runs inside a virtual environment at /app/.venv, > so any Python packages you need (like psycopg2-binary and gevent) must be > installed into that venv—not system-wide. Installing with pip or uv as > root doesn't put them in the right place for Superset to see them at > runtime. > > To fix this, update your Dockerfile so that after all system dependencies > are installed, you install Python packages using the venv's pip or uv, like > this: > > RUN /app/.venv/bin/uv pip install --no-cache-dir gevent psycopg2-binary redis pydoris pymysql > > Or, if you want to verify the install during build: > > RUN /app/.venv/bin/uv pip install --no-cache-dir gevent psycopg2-binary redis pydoris pymysql && \ > /app/.venv/bin/python -c "import psycopg2, gevent" > > This ensures the packages are available to Superset at runtime. For > maintainability, you can also use a requirements-local.txt file and > install with /app/.venv/bin/uv pip install -r requirements-local.txt > during build. > > System-wide installs won't work because the Superset process only sees > packages inside /app/.venv at runtime. > > *To reply, just mention @dosu <https://go.dosu.dev/dosubot>.* > ------------------------------ > > How did I do? Good > <https://app.dosu.dev/response-feedback/0ba68af5-af57-4f66-9422-436019122538?feedback_type=great_response> > | Irrelevant > <https://app.dosu.dev/response-feedback/0ba68af5-af57-4f66-9422-436019122538?feedback_type=irrelevant_answer> > | Incorrect > <https://app.dosu.dev/response-feedback/0ba68af5-af57-4f66-9422-436019122538?feedback_type=incorrect_sources> > | Verbose > <https://app.dosu.dev/response-feedback/0ba68af5-af57-4f66-9422-436019122538?feedback_type=too_verbose> > | Hallucination > <https://app.dosu.dev/response-feedback/0ba68af5-af57-4f66-9422-436019122538?feedback_type=hallucination> > | Report 🐛 > <https://app.dosu.dev/response-feedback/0ba68af5-af57-4f66-9422-436019122538?feedback_type=bug_report> > | Other > <https://app.dosu.dev/response-feedback/0ba68af5-af57-4f66-9422-436019122538?feedback_type=other> > [image: Chat with Dosu] > <https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github> > [image: Join Discord] <https://go.dosu.dev/discord-bot> [image: Share on > X] > <https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/34185> > > — > Reply to this email directly, view it on GitHub > <https://github.com/apache/superset/issues/34185#issuecomment-3208171533>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/BUWUU5MY5D7RFCFNRRMUNPT3OTTWHAVCNFSM6AAAAACBUCLHVCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTEMBYGE3TCNJTGM> > . > You are receiving this because you modified the open/close state.Message > ID: ***@***.***> > -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org