Install Proj for your CUDA version#

Python 3.11 or newer and NumPy 2 or newer are required. Choose the command that matches your CUDA version and installation source.

Goal

Command

Requirements

Install a local CUDA 12 wheel

python -m pip install "${wheel}[cu12]"

Set wheel to the wheel path. The wheel must contain the CUDA 12 native payload.

Install a local CUDA 13 wheel

python -m pip install "${wheel}[cu13]"

Set wheel to the wheel path. The wheel must contain the CUDA 13 native payload.

Build CUDA 12 from the repository root

CUGEO_PROJ_BUILD_CUDA=1 CUGEO_PROJ_CUDA_MAJOR=12 python -m pip install './cugeo-proj[cu12]'

Matching toolkit, supported GPU architecture, and discoverable system PROJ and libtiff.

Build CUDA 13 from the repository root

CUGEO_PROJ_BUILD_CUDA=1 CUGEO_PROJ_CUDA_MAJOR=13 python -m pip install './cugeo-proj[cu13]'

Matching toolkit, supported GPU architecture, and discoverable system PROJ and libtiff.

The extra selects the matching CuPy dependency. A supplied prebuilt payload must match the requested backend. A multi-backend wheel needs the host payload and each CUDA library it advertises.

Inspect the selected installation#

Inspect native_library_path, the compiled backend, and the runtime PROJ version and database. If Python loads the host library even though CuPy is installed, check the selection order: an explicit override takes precedence over a configured Geometry image provider, and either can fail directly. Automatic selection can use an intact installed host payload when the CUDA runtime is unavailable.

From a matching checkout, run the host example to isolate a host setup problem. It prints coordinates, statuses, and the plan explanation.

python cugeo-proj/examples/cpu.py

Verify the device transform#

The device example also needs pyproj. The cu12 and cu13 extras alone do not supply it. From the matching checkout, run the command.

python cugeo-proj/examples/device.py

The example transforms CuPy longitude/latitude pairs (3, 0) and (6, 45) on an explicit stream to UTM 31N. Look for two OK rows near (500000, 0) and (736446.026101, 4987329.504699) metres. The example checks the positions against pyproj within 1e-6 m. Completing the run establishes that the selected installation can execute this device transform.