GitHub user dosubot[bot] added a comment to the discussion: ModuleNotFoundError: No module named 'authlib' when implementing Google OAuth with Apache Superset Docker
<!-- Answer --> The issue is that Superset’s Docker image expects requirements-local.txt to be placed in the docker/ directory (i.e., docker/requirements-local.txt), not /app/requirements-local.txt. The official bootstrap script only looks for the file in docker/ and installs it at container startup, not during the Docker build. Installing at build time or from a different path can result in packages not being available in the runtime environment, which causes the ModuleNotFoundError you’re seeing [reference](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/docker/docker-bootstrap.sh). To fix this, move your requirements-local.txt into the docker/ directory of your build context (so it becomes docker/requirements-local.txt), and do not install it manually in the Dockerfile. The bootstrap script will automatically install these dependencies into the correct virtual environment when the container starts [reference](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/docker/docker-bootstrap.sh). You do not need to add a RUN uv pip install ... line for requirements-local.txt in your Dockerfile. Just copy your requirements-local.txt to docker/ and rebuild your image. If you want to verify the install, you can add a test like RUN /app/.venv/bin/python -c "import authlib" after the install step. This workflow matches the official pattern and should resolve the ModuleNotFoundError for authlib and any other Python dependencies [reference](https://github.com/apache/superset/issues/34557). <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/3e64ea6f-3f6e-4868-8be7-163b1981b9d4?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/3e64ea6f-3f6e-4868-8be7-163b1981b9d4?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/3e64ea6f-3f6e-4868-8be7-163b1981b9d4?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/3e64ea6f-3f6e-4868-8be7-163b1981b9d4?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/3e64ea6f-3f6e-4868-8be7-163b1981b9d4?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/3e64ea6f-3f6e-4868-8be7-163b1981b9d4?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/3e64ea6f-3f6e-4868-8be7-163b1981b9d4?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)& nbsp;[](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/35183) GitHub link: https://github.com/apache/superset/discussions/35183#discussioncomment-14439405 ---- 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