dosubot[bot] commented on issue #37297:
URL: https://github.com/apache/superset/issues/37297#issuecomment-3775118164

   <!-- Answer -->
   This is a known pain point: the official Superset Docker image (6.0.0) 
declares python-geohash==0.8.5 as a direct dependency, which requires a C++ 
toolchain to build from source, but the image does not include g++ or 
build-essential in the final runtime layers. This causes pip install to fail 
with a missing compiler error when resolving or reinstalling dependencies 
inside the container, even if you don't explicitly depend on python-geohash 
yourself. You can see the dependency in 
[requirements/base.txt](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/requirements/base.txt#L311-L314)
 and the absence of build tools in the 
[Dockerfile](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/Dockerfile#L21-L223).
   
   There is no official fix yet to remove or replace python-geohash or to make 
it optional. The most robust workaround is to build your own Docker image based 
on the official one, installing build-essential and any other required system 
packages before installing or updating Python dependencies. Community threads 
confirm this is a common issue for all packages with native extensions (like 
psycopg2, mysqlclient, and python-geohash), and users often add a bootstrap 
script or custom Dockerfile layer to install the necessary tools before running 
pip or uv pip install. See this 
[discussion](https://github.com/apache/superset/discussions/31431) for examples 
and community workarounds.
   
   If you need to install or update dependencies inside the container, you must 
first install build-essential (and g++) using apt-get, then run your pip/uv 
install commands, and optionally remove the build tools afterward to keep the 
image lean. There is no pure-Python alternative or optionalization for 
python-geohash in Superset 6.0.0 as of now.
   
   
   <!-- 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/304237f1-0185-4c10-b5e4-757d291bff81?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/304237f1-0185-4c10-b5e4-757d291bff81?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/304237f1-0185-4c10-b5e4-757d291bff81?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/304237f1-0185-4c10-b5e4-757d291bff81?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/304237f1-0185-4c10-b5e4-757d291bff81?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/304237f1-0185-4c10-b5e4-757d291bff81?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/304237f1-0185-4c10-b5e4-757d291bff81?feedback_type=other)</sup>
   
   [![Chat with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&nbsp;[![Open
 in 
Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=This%20is%20a%20known%20pain%20point%3A%20the%20official%20Superset%20Docker%20image%20%286.0.0%29%20declares%20python-geohash%3D%3D0.8.5%20as%20a%20direct%20dependency%2C%20which%20requires%20a%20C%2B%2B%20toolchain%20to%20build%20from%20source%2C%20but%20the%20image%20does%20not%20include%20g%2B%2B%20or%20build-essential%20in%20the%20final%20runtime%20layers.%20This%20causes%20pip%20install%20to%20fail%20with%20a%20missing%20compiler%20error%20when%20resolving%20or%20reinstalling%20dependencies%20inside%20the%20container%2C%20even%20if%20you%20don%27t%20explicitly%20depend%20on%20python-geohash%20yourself.%20You%20can%20see%20the%20dependency%20in%20%5Brequirements/base.txt%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b0
 
63ffe45377799c/requirements/base.txt%23L311-L314%29%20and%20the%20absence%20of%20build%20tools%20in%20the%20%5BDockerfile%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/Dockerfile%23L21-L223%29.%0A%0AThere%20is%20no%20official%20fix%20yet%20to%20remove%20or%20replace%20python-geohash%20or%20to%20make%20it%20optional.%20The%20most%20robust%20workaround%20is%20to%20build%20your%20own%20Docker%20image%20based%20on%20the%20official%20one%2C%20installing%20build-essential%20and%20any%20other%20required%20system%20packages%20before%20installing%20or%20updating%20Python%20dependencies.%20Community%20threads%20confirm%20this%20is%20a%20common%20issue%20for%20all%20packages%20with%20native%20extensions%20%28like%20psycopg2%2C%20mysqlclient%2C%20and%20python-geohash%29%2C%20and%20users%20often%20add%20a%20bootstrap%20script%20or%20custom%20Dockerfile%20layer%20to%20install%20the%20necessary%20tools%20before%20running%20pip%20or%20uv%20pip%20install.%20
 
See%20this%20%5Bdiscussion%5D%28https%3A//github.com/apache/superset/discussions/31431%29%20for%20examples%20and%20community%20workarounds.%0A%0AIf%20you%20need%20to%20install%20or%20update%20dependencies%20inside%20the%20container%2C%20you%20must%20first%20install%20build-essential%20%28and%20g%2B%2B%29%20using%20apt-get%2C%20then%20run%20your%20pip/uv%20install%20commands%2C%20and%20optionally%20remove%20the%20build%20tools%20afterward%20to%20keep%20the%20image%20lean.%20There%20is%20no%20pure-Python%20alternative%20or%20optionalization%20for%20python-geohash%20in%20Superset%206.0.0%20as%20of%20now.)&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/issues/37297)


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to