A geospatial Python environment for working with raster data, vector data, satellite imagery, and machine learning. Built on top of GeoPandas, Rasterio, PyTorch, and JupyterLab.
| Platform | Python | File |
|---|---|---|
| macOS (Apple Silicon / Intel) | 3.12 | reqtext_p312_mac.txt |
| Linux x86_64 | 3.12 | reqtext_p312_linux.txt |
Note: The two files differ because some packages (
pyobjc,appnope) are macOS-only, and several packages likerasterio 1.5.0andtorch 2.12.0require Python 3.12 which is only used on the Linux side.
-
Homebrew — if not already installed:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" -
GDAL — required by rasterio:
brew install gdal
-
uv — fast Python package manager:
brew install uv
-
GDAL — required by rasterio:
sudo apt update sudo apt install gdal-bin libgdal-dev python3-dev build-essential
-
uv — fast Python package manager:
curl -LsSf https://astral.sh/uv/install.sh | sh
# 1. Clone the repo
git clone https://github.com/thescriptingcave/geospatial.git
cd geospatial
# 2. Create and activate a virtual environment with Python 3.11
uv venv --python 3.12
source .venv/bin/activate
# 3. Install dependencies
uv pip install -r reqtext_p312_mac.txt# 1. Clone the repo
git clone https://github.com/thescriptingcave/geospatial.git
cd geospatial
# 2. Install Python 3.12 if not already available
uv python install 3.12
# 3. Create and activate a virtual environment with Python 3.12
uv venv --python 3.12
source .venv/bin/activate
# 4. Install dependencies
uv pip install -r reqtext_p312_linux.txtOnce your environment is activated:
jupyter labThis will open JupyterLab in your browser at http://localhost:8888.
| Category | Packages |
|---|---|
| Geospatial | GeoPandas, Rasterio, Shapely, PyProj, osmnx, Folium |
| Raster / imagery | Rasterio, imagecodecs, tifffile, imageio, opencv-headless |
| Machine learning | PyTorch, torchvision, scikit-learn, scikit-image |
| Data science | NumPy, SciPy, Pandas, Matplotlib, SymPy |
| Notebooks | JupyterLab, ipywidgets, nbconvert |
rasterio fails to import on Linux
Make sure GDAL is installed at the system level:
sudo apt install gdal-bin libgdal-devuv can't find Python 3.12 on Linux
Let uv download and manage it:
uv python install 3.12pyobjc errors on Linux
This package is macOS-only and is not included in reqtext_p312_linux.txt. Make sure you're using the correct requirements file for your platform.
Dependency conflicts Always install inside a fresh virtual environment. If you hit conflicts, try:
deactivate
rm -rf .venv
uv venv --python 3.12 # or 3.11 on macOS
source .venv/bin/activate
uv pip install -r reqtext_p312_linux.txtgeo_env/
├── reqtext_p312_mac.txt # macOS dependencies (Python 3.11)
├── reqtext_p312_linux.txt # Linux x86_64 dependencies (Python 3.12)
├── README.md
└── notebooks/ # Jupyter notebooks go here
MIT