[Python] ImportError: cannot import name '_gdal_array' from 'osgeo'

Discussão em 'Python' iniciado por Stack, Maio 16, 2025.

  1. Stack

    Stack Membro Participativo

    I create a fresh environment, install numpy, then install GDAL. GDAL imports successfully and I can open images using gdal.Open(, but I get the ImportError: cannot import name '_gdal_array' from 'osgeo' error when trying to use ReadAsRaster.

    pip list returns:

    GDAL 3.6.2
    numpy 1.24.2
    pip 23.0
    setuptools 65.6.3
    wheel 0.38.4


    Completely stumped, has anyone come across this? Google tells me that installing numpy first is the solution (but that doesn't help). Help would be much appreciated.

    Continue reading...

Compartilhe esta Página