Deployment Error on New Environment: Geospatial packages (GDAL) failing with libodbc2 conflict

Hello Streamlit Community,

I’m facing a persistent deployment issue with my geospatial app.

The key information is that previously working versions of my app, which deployed successfully in the past, are now also failing with the same dependency error. This strongly suggests a recent change in the Streamlit Cloud base environment that has created a conflict.

The app uses Geopandas, Rasterio, and other geospatial libraries. The error happens during the apt-get install phase and points to a conflict with libgdal-dev and its dependency libodbc2.

Link to my GitHub repository:
(Aquí pega el enlace a tu repositorio público de GitHub)

Here are my current configuration files:

packages.txt:

build-essential libgdal-dev libproj-dev


**requirements.txt:**

streamlit pandas altair folium plotly geopandas scipy prophet streamlit-folium numpy branca openpyxl rasterstats xarray Pillow rioxarray statsmodels scikit-learn pymannkendall gstools rasterio fpdf2 climate-indices


**Here is a snippet of the error from the log:**

Errors were encountered while processing: /tmp/apt-dpkg-install-W27Tj7/067-libodbc2_2.3.11-2+deb12u1_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)


Could you please provide the current recommended `packages.txt` configuration for a geospatial app on the latest deployment environment?

Thank you for your help!

Why do you need that in packages.txt?

Hello, Thank you for your reply. To answer your question: we need libgdal-dev and libproj-dev in packages.txt because our Python application relies heavily on these geospatial libraries from requirements.txt: * geopandas * rasterio * gstools These Python libraries require the underlying C/C++ libraries (GDAL and PROJ) to be installed on the system for them to be compiled and work correctly. Without these system packages, pip is unable to install our required Python dependencies. Our goal is to find the correct packages.txt configuration to successfully deploy a standard geospatial Python application on the current Streamlit Cloud environment. Thank you for your help.

Contexto: Estoy desarrollando hace meses una aplicación para un Visor geoespacial de información climática y tuve dificultades con la última versión, pero adicionalmente dejaron de funcionar las diferentes versiones que ya eran estables y funcionales. Cuando intento ingresar a cualquiera de ellas aparece este mensaje:

Error installing requirements. Click “Manage App” and consult the terminal for more details.

If you still have questions, leave a message in our forums and we will get back to you ASAP.

El error parece deberse a un conflicto de dependencias entre libgdal-dev y libodbc2. Ya he probado varias configuraciones en mi packages.txt sin éxito. Error de registro: (Pegue aquí el registro de errores completo que se ve en su terminal, similar a la captura de pantalla que me envió) Enlace a mi repositorio de GitHub: (Pegue aquí el enlace a su repositorio público de GitHub) Aquí están mis archivos de configuración: packages.txt: libgdal-dev libproj-dev requirements.txt: streamlit pandas altair folium plotly geopandas scipy prophet streamlit-folium numpy branca openpyxl rasterstats xarray Pillow rioxarray statsmodels scikit-learn pymannkendall gstools rasterio fpdf2 climate-indices ¿Podrían ayudarme a encontrar la configuración correcta para resolver este conflicto de dependencias?

Y Quisiera saber cómo resolver el problema con mis otros proyectos que ahora no funcionan.

La verdad estoy muy angustiado por haber perdido el trabajo de meses. Gracias por la ayuda.

Title: Deployment Failing: Previously working geospatial apps now fail with GDAL/ODBC dependency conflict Message: Hello Streamlit Team, I’m facing a critical deployment issue. Even my old apps, which were stable and deployed successfully in the past, are now failing to deploy. This suggests a recent change in the base deployment environment. The error is a system-level dependency conflict when trying to install libgdal-dev, which fails because of an unmet dependency for libodbc2. - Link to my GitHub repo: [Aquí pega el enlace a tu repositorio de GitHub] - packages.txt: build-essential libgdal-dev libproj-dev - requirements.txt: streamlit pandas geopandas # ... (and your other Python libraries) Since this is happening even with previously working projects, could you please advise on the new correct configuration for geospatial libraries on the current Streamlit Cloud environment? Thank you.

I would need more details about this issue, because I cannot reproduce it.

I’m facing a critical deployment issue. Even my old apps, which were stable and deployed successfully in the past, are now failing to deploy. This suggests a recent change in the base deployment environment.

The error is a system-level dependency conflict when trying to install libgdal-dev, which fails because of an unmet dependency for libodbc2.


build-essential

libgdal-dev

libproj-dev

  • requirements.txt:

streamlit

pandas

geopandas

# ... (and your other Python libraries)

Since this is happening even with previously working projects, could you please advise on the new correct configuration for geospatial libraries on the current Streamlit Cloud environment?

Thank you.

I don’t understand yet what makes you think you need those packages in packages.txt.

Hello - have you found any resolution to this error yet? I’m running into the same problem of a previously working geospatial app no longer loading to the dependency error (libodbc2). My app had the a similar structure (packages.txt and requirements.txt with a host of geospatial libraries).

I tried removing the packages.txt, and specifying specific library versions in the requirements.txt, but keep running into the same roadblock.

Thanks for the time and consideration to sort through this! Looking forward to figuring out a solution going forward.

Hola.
Después de muchos ensayos y sufrimiento,

La solución fue eliminar packages.txt en su totalidad y todo volvió a la normalidad.