βοΈ Environment Setup for Dataset Download
To download and process datasets, you need to set up a Python environment with geospatial libraries such as GDAL, Rasterio, and Xarray.
1: On Local PC
1: Install Conda (Recommended)
Conda is a cross-platform environment manager that makes it easy to install geospatial libraries like GDAL.
Windows
- Download the Miniconda installer:
π Miniconda Windows 64-bit - Run the installer and choose βAdd Miniconda to PATHβ during setup.
- After installation, open Anaconda Prompt or Command Prompt and test:
conda --version
MacOS OS
-
Download the installer for macOS from:
π Miniconda macOS -
Run the installer
-
Restart terminal and verify:
conda --version
2: Create a Conda Environment
conda create --name eqipa_env python=3.10
conda activate eqipa_env
3: Install GDAL and Geospatial Libraries
Use the conda-forge
channel:
conda install -c conda-forge gdal libgdal-jp2openjpeg
Verify GDAL installation:
gdalinfo --version
Then install required Python libraries:
conda install pandas tqdm geopandas numpy xarray rioxarray rasterio netCDF4 requests
4: Enable Jupyter Notebook Support (Optional)
conda install -c conda-forge notebook ipykernel
python -m ipykernel install --user --name=eqipa_env --display-name "Python (eqipa_env)"
To select the environment kernel in Jupyter: Kernel β Change Kernel β Python (eqipa_env)
Optional Cleanup: If you ever want to remove the kernel, use:
jupyter kernelspec uninstall eqipa_env
Optional: Save Environment for Future Use
conda env export > eqipa_env.yml
Others can recreate the environment with:
conda env create -f eqipa_env.yml
On Ubuntu (Without Conda)
1. Install GDAL system packages
sudo apt-get install gdal-bin libgdal-dev libspatialindex-dev
2. Create and Activate a Python Virtual Environment
python3 -m venv venv
source venv/bin/activate
3. Install Required Python Libraries
pip install pandas tqdm geopandas numpy xarray rioxarray rasterio netCDF4
4. Recommended requirements.txt
You can create a requirements.txt
for reuse:
pandas
tqdm
geopandas
numpy
xarray
rioxarray
rasterio
netCDF4
Install with:
pip install -r requirements.txt
β Next Step
Once the environment is set up, proceed to the dataset you want to download.