GitHub user dosubot[bot] added a comment to the discussion: Superset 5.x 
Upgradation fails to start

<!-- Answer -->
Superset 5.x Docker images use a virtual environment managed by `uv`, so 
installing packages with `pip` in your container command doesn't put them in 
the environment Superset actually uses at runtime. That's why your `pip install 
setuptools` isn't making `pkg_resources` available to your config.

To fix this, replace all your `pip install ...` commands with `uv pip install 
...` in your Docker command. For your specific error, make sure to run `uv pip 
install setuptools` before starting Superset. This ensures `pkg_resources` is 
available when your config is imported. You can also add all your dependencies 
(including `setuptools`) to a requirements file and run `uv pip install -r 
requirements.txt` instead.

This change is needed because Superset 5.x no longer includes `pkg_resources` 
by default, and the environment handling has changed. More details and examples 
are in these threads:  
[ModuleNotFoundError: No module named 
pkg_resources](https://github.com/apache/superset/issues/31600)  
[Why pip install doesn't work in Superset 5.x 
Docker](https://github.com/apache/superset/issues/34557)  
[Superset 5.x Docker dependency management 
discussion](https://github.com/apache/superset/discussions/34109)


<!-- 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/40ab8f8b-bf42-465c-a502-e40a819c424e?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/40ab8f8b-bf42-465c-a502-e40a819c424e?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/40ab8f8b-bf42-465c-a502-e40a819c424e?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/40ab8f8b-bf42-465c-a502-e40a819c424e?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/40ab8f8b-bf42-465c-a502-e40a819c424e?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/40ab8f8b-bf42-465c-a502-e40a819c424e?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/40ab8f8b-bf42-465c-a502-e40a819c424e?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat
 with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&
 nbsp;[![Join 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/34635)

GitHub link: 
https://github.com/apache/superset/discussions/34635#discussioncomment-14070344

----
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