Spaces:
Sleeping
Sleeping
# Update package list | |
sudo apt update | |
# Install GDAL and its development files | |
sudo apt install -y gdal-bin libgdal-dev | |
# Install Python3 development files | |
sudo apt install -y python3-dev | |
# Get GDAL version | |
GDAL_VERSION=$(gdal-config --version) | |
# Install GDAL for pip with the matching version | |
pip install GDAL==$GDAL_VERSION | |
# Install other required packages | |
pip install streamlit | |
# Create a Python script to test the installation | |
cat << EOF > test_osgeo.py | |
import streamlit as st | |
from osgeo import gdal | |
st.write(f"GDAL version: {gdal.__version__}") | |
EOF | |
# Run the test script | |
streamlit run test_osgeo.py |