[gdal-dev] Generating Python Bindings for GDAL 3.11.4

Mazin Marwan mazin.marwan0 at gmail.com
Wed Oct 1 11:54:40 PDT 2025


Further on this, I've tried to generate the bindings myself by duplicating
swig/python/setup.py.in and replacing the template variables. However I'm
running into this error when I run
C:\Users\ma005968\AppData\Local\Programs\Python\Python313\python.exe
setup.py

gdal_wrap.cpp
c1xx: fatal error C1083: Cannot open source file:
'extensions/gdal_wrap.cpp': No such file or directory
gnm_wrap.cpp
c1xx: fatal error C1083: Cannot open source file:
'extensions/gnm_wrap.cpp': No such file or directory

The readme.rst isn't incredibly clear on how to generate the python
bindings myself and this was my understanding of how to do it as running
the cmake command there wasn't working either.

On Mon, Sep 29, 2025 at 3:08 PM Mazin Marwan <mazin.marwan0 at gmail.com>
wrote:

> Hi all,
>
> I've installed GDAL 3.11.4 using VCPKG and am now trying to generate the
> python bindings using:
>
> pip install gdal
>
> However I'm running into the following error:
>
> ERROR: Failed building wheel for gdal
> Failed to build gdal
> error: failed-wheel-build-for-install
>
> × Failed to build installable wheels for some pyproject.toml based projects
> ╰─> gdal
>
> A bit of research online has led me to believe that the pip version is
> just broken and that the fix is installing a .whl file from
> cgholke's geospatial wheels repo but that seems like a workaround instead
> of a proper fix. Is there another way to fix this?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20251001/578aafbf/attachment-0001.htm>


More information about the gdal-dev mailing list