Spaces:
Sleeping
Sleeping
File size: 677 Bytes
dbc0199 d347c46 6f74efc 1eea3f5 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
#!/bin/bash
# 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
# Install GDAL Python bindings
sudo apt install -y python3-gdal
# Get GDAL version
GDAL_VERSION=$(gdal-config --version)
# Install GDAL for pip with the matching version
pip install GDAL
# Create a Python script to test the installation
cat << EOF > test_osgeo.py
import osgeo
print(f"OSGEO version: {osgeo.__version__}")
EOF
# Run the test script
python3 test_osgeo.py
echo "Installation complete. If you see the OSGEO version above, the installation was successful." |