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

   <!-- Greeting -->
   Hello, @SPSCosta! I'm here to help you with any bugs, questions, or 
contributions you have regarding Apache Superset. Let's tackle this issue 
together!
   
   <!-- Answer -->
   To resolve the Python modules error related to MySQL when upgrading Apache 
Superset from version 4.0.1 to 4.1.1 using Helm charts on AKS, you need to 
modify your `dev-values.yaml` file to include a `bootstrapScript` that installs 
the necessary MySQL and PostgreSQL drivers. Here is the updated code snippet to 
include:
   
   ```yaml
   bootstrapScript: |
     #!/bin/bash
     # Update system packages and install dependencies
     apt update && apt install -y gcc libpq-dev python3-dev pkg-config 
libmysqlclient-dev && \
     
     # Install Python dependencies
     pip install psycopg2==2.9.6 \
       sqlalchemy-bigquery==1.6.1 \
       elasticsearch-dbapi==0.2.5 \
       mysqlclient && \
   
     # Create a bootstrap log file if not already created
     if [ ! -f ~/bootstrap ]; then 
       echo "Running Superset with uid {{ .Values.runAsUser }}" > ~/bootstrap
     fi
   ```
   
   This script ensures that the necessary system packages (`pkg-config`, 
`libmysqlclient-dev`) and Python dependencies (`psycopg2`, `mysqlclient`) are 
installed, which resolves the 'No module named MySQLdb' error. Starting from 
Superset version 4.1.0, database drivers like MySQL were intentionally removed 
from the base Docker image to create a leaner image. Therefore, you need to 
manually install the required drivers by creating a custom Dockerfile that 
includes the necessary build dependencies before installing the database 
drivers <sup>[[1]](https://github.com/apache/superset/discussions/31432)</sup>.
   
   
   <!-- Dosu Comment Footer -->
   *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
   
   ---
   <sup>Help Dosu learn! Give it feedback: [Great 
Response](https://app.dosu.dev/response-feedback/f93cc595-b81e-4176-ac5f-eb759bd653b0?feedback_type=great_response)
 | [Irrelevant 
Answer](https://app.dosu.dev/response-feedback/f93cc595-b81e-4176-ac5f-eb759bd653b0?feedback_type=irrelevant_answer)
 | [Incorrect 
Sources](https://app.dosu.dev/response-feedback/f93cc595-b81e-4176-ac5f-eb759bd653b0?feedback_type=incorrect_sources)
 | [Too 
Verbose](https://app.dosu.dev/response-feedback/f93cc595-b81e-4176-ac5f-eb759bd653b0?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/f93cc595-b81e-4176-ac5f-eb759bd653b0?feedback_type=hallucination)
 | 
[Other](https://app.dosu.dev/response-feedback/f93cc595-b81e-4176-ac5f-eb759bd653b0?feedback_type=other)</sup>
   


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

Reply via email to