-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgdal_install.sh
47 lines (37 loc) · 912 Bytes
/
gdal_install.sh
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
#install gdal without conda on ubuntu 24.04LTS
# Dec 2024, RTS
# Exit on error
set -e
# Update package list
sudo apt-get update
# Install system dependencies
sudo apt-get install -y \
python3-pip \
python3-dev \
build-essential \
gdal-bin \
libgdal-dev \
python3-gdal
# Get GDAL version
GDAL_VERSION=$(gdal-config --version)
echo "GDAL version: $GDAL_VERSION"
# Activate virtual environment (uncomment and modify path if needed)
# source /path/to/SAT/bin/activate
# Install Python packages
pip install --upgrade pip
pip install wheel
pip install setuptools
# Install GDAL with matching version
pip install GDAL==${GDAL_VERSION}
# Install additional packages
pip install \
numpy \
rasterio \
shapely \
openeo \
matplotlib \
pillow \
pyproj
# Verify installation
python -c "from osgeo import gdal; print('GDAL Version:', gdal.__version__)"