GitHub user dosubot[bot] added a comment to the discussion: Unable to Connect SQL Server Database in Apache Superset
<!-- Answer --> This persistent error usually means pyodbc still isn’t installed in the Python environment Superset actually uses at runtime. To help you debug, could you please: 1. Share the relevant part of your Dockerfile (especially the lines where you install pyodbc, switch users, or do anything with virtual environments). 2. Run uv pip list and/or pip freeze inside your running Superset container and paste the output here. 3. Let me know if you saw any errors or warnings during the Docker build, especially at the uv pip install pyodbc step. 4. Confirm you rebuilt your Docker image with --no-cache or --force-rm. Also, double-check that your Dockerfile does not recreate the virtual environment (e.g., with python3 -m venv /app/.venv), as this will break package visibility even if you use uv pip install. Once I have this info, I can help you pinpoint exactly what’s going wrong and get pyodbc working in your container. <!-- 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/5faf72b1-f5a6-4a3c-b244-90d9a917cc4d?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/5faf72b1-f5a6-4a3c-b244-90d9a917cc4d?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/5faf72b1-f5a6-4a3c-b244-90d9a917cc4d?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/5faf72b1-f5a6-4a3c-b244-90d9a917cc4d?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/5faf72b1-f5a6-4a3c-b244-90d9a917cc4d?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/5faf72b1-f5a6-4a3c-b244-90d9a917cc4d?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/5faf72b1-f5a6-4a3c-b244-90d9a917cc4d?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github) [](https://cursor.com/link/prompt?text=This%20persistent%20error%20usually%20means%20pyodbc%20still%20isn%E2%80%99t%20installed%20in%20the%20Python%20environment%20Superset%20actually%20uses%20at%20runtime.%20To%20help%20you%20debug%2C%20could%20you%20please%3A%0A%0A1.%20Share%20the%20relevant%20part%20of%20your%20Dockerfile%20%28especially%20the%20lines%20where%20you%20install%20pyodbc%2C%20switch%20users%2C%20or%20do%20anything%20with%20virtual%20environments%29.%0A2.%20Run%20uv%20pip%20list%20and/or%20pip%20freeze%20inside%20your%20running%20Superset%20container%20and%20paste%20the%20output%20here.%0A3.%20Let%20me%20know%20if%20you%20saw%20any%20errors%20or%20warnings%20during%20the%20Docker%20build%2C%20especially%20at%20the%20uv%20pip%20install%20pyodbc%20step.%0A4.%20Confirm%20you%20 rebuilt%20your%20Docker%20image%20with%20--no-cache%20or%20--force-rm.%0A%0AAlso%2C%20double-check%20that%20your%20Dockerfile%20does%20not%20recreate%20the%20virtual%20environment%20%28e.g.%2C%20with%20python3%20-m%20venv%20/app/.venv%29%2C%20as%20this%20will%20break%20package%20visibility%20even%20if%20you%20use%20uv%20pip%20install.%0A%0AOnce%20I%20have%20this%20info%2C%20I%20can%20help%20you%20pinpoint%20exactly%20what%E2%80%99s%20going%20wrong%20and%20get%20pyodbc%20working%20in%20your%20container.) [](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/issues/37560) GitHub link: https://github.com/apache/superset/discussions/37650#discussioncomment-15687807 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
