Unable to Install GDAL Using PIP on Python

2024/11/13 23:07:32

I'm trying to install gdal in python3.8.8 (Windows 10) and i'm getting below error I have install Visual Studio Build Tools 2019 and reboot my PC Downgrade my Python from 3.9.5 to 3.8.8

C:\Program Files\Python38>pip install gdal
Collecting gdalUsing cached GDAL-3.3.1.tar.gz (746 kB)
Building wheels for collected packages: gdalBuilding wheel for gdal (setup.py) ... error
ERROR: Command errored out with exit status 1:command: 'c:\program files\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Administrator\\AppData\\Local\\Temp\\pip-install-d1sufozs\\gdal\\setup.py'"'"'; __file__='"'"'C:\\Users\\Administrator\\AppData\\Local\\Temp\\pip-install-d1sufozs\\gdal\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Administrator\AppData\Local\Temp\pip-record-q2jdc13d\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\program files\python38\Include\gdal'cwd: C:\Users\Administrator\AppData\Local\Temp\pip-install-d1sufozs\gdal\Complete output (136 lines):WARNING: numpy not available!  Array support will not be enabledrunning installrunning buildrunning build_pycreating buildcreating build\lib.win-amd64-3.8creating build\lib.win-amd64-3.8\osgeocopying osgeo\gdal.py -> build\lib.win-amd64-3.8\osgeocopying osgeo\gdalconst.py -> build\lib.win-amd64-3.8\osgeocopying osgeo\gdalnumeric.py -> build\lib.win-amd64-3.8\osgeocopying osgeo\gdal_array.py -> build\lib.win-amd64-3.8\osgeocopying osgeo\gnm.py -> build\lib.win-amd64-3.8\osgeocopying osgeo\ogr.py -> build\lib.win-amd64-3.8\osgeocopying osgeo\osr.py -> build\lib.win-amd64-3.8\osgeocopying osgeo\utils.py -> build\lib.win-amd64-3.8\osgeocopying osgeo\__init__.py -> build\lib.win-amd64-3.8\osgeocreating build\lib.win-amd64-3.8\osgeo_utilscopying gdal-utils\osgeo_utils\gdal2tiles.py -> build\lib.win-amd64-3.8\osgeo_utilscopying gdal-utils\osgeo_utils\gdal2xyz.py -> build\lib.win-amd64-3.8\osgeo_utilscopying gdal-utils\osgeo_utils\gdalattachpct.py -> build\lib.win-amd64-3.8\osgeo_utilscopying gdal-utils\osgeo_utils\gdalcompare.py -> build\lib.win-amd64-3.8\osgeo_utilscopying gdal-utils\osgeo_utils\gdalmove.py -> build\lib.win-amd64-3.8\osgeo_utilscopying gdal-utils\osgeo_utils\gdal_calc.py -> build\lib.win-amd64-3.8\osgeo_utilscopying gdal-utils\osgeo_utils\gdal_edit.py -> build\lib.win-amd64-3.8\osgeo_utilscopying gdal-utils\osgeo_utils\gdal_fillnodata.py -> build\lib.win-amd64-3.8\osgeo_utilscopying gdal-utils\osgeo_utils\gdal_merge.py -> build\lib.win-amd64-3.8\osgeo_utilscopying gdal-utils\osgeo_utils\gdal_pansharpen.py -> build\lib.win-amd64-3.8\osgeo_utilscopying gdal-utils\osgeo_utils\gdal_polygonize.py -> build\lib.win-amd64-3.8\osgeo_utilscopying gdal-utils\osgeo_utils\gdal_proximity.py -> build\lib.win-amd64-3.8\osgeo_utilscopying gdal-utils\osgeo_utils\gdal_retile.py -> build\lib.win-amd64-3.8\osgeo_utilscopying gdal-utils\osgeo_utils\gdal_sieve.py -> build\lib.win-amd64-3.8\osgeo_utilscopying gdal-utils\osgeo_utils\ogrmerge.py -> build\lib.win-amd64-3.8\osgeo_utilscopying gdal-utils\osgeo_utils\pct2rgb.py -> build\lib.win-amd64-3.8\osgeo_utilscopying gdal-utils\osgeo_utils\rgb2pct.py -> build\lib.win-amd64-3.8\osgeo_utilscopying gdal-utils\osgeo_utils\__init__.py -> build\lib.win-amd64-3.8\osgeo_utilscreating build\lib.win-amd64-3.8\osgeo_utils\auxiliarycopying gdal-utils\osgeo_utils\auxiliary\array_util.py -> build\lib.win-amd64-3.8\osgeo_utils\auxiliarycopying gdal-utils\osgeo_utils\auxiliary\base.py -> build\lib.win-amd64-3.8\osgeo_utils\auxiliarycopying gdal-utils\osgeo_utils\auxiliary\batch_creator.py -> build\lib.win-amd64-3.8\osgeo_utils\auxiliarycopying gdal-utils\osgeo_utils\auxiliary\color_palette.py -> build\lib.win-amd64-3.8\osgeo_utils\auxiliarycopying gdal-utils\osgeo_utils\auxiliary\color_table.py -> build\lib.win-amd64-3.8\osgeo_utils\auxiliarycopying gdal-utils\osgeo_utils\auxiliary\extent_util.py -> build\lib.win-amd64-3.8\osgeo_utils\auxiliarycopying gdal-utils\osgeo_utils\auxiliary\gdal_argparse.py -> build\lib.win-amd64-3.8\osgeo_utils\auxiliarycopying gdal-utils\osgeo_utils\auxiliary\numpy_util.py -> build\lib.win-amd64-3.8\osgeo_utils\auxiliarycopying gdal-utils\osgeo_utils\auxiliary\osr_util.py -> build\lib.win-amd64-3.8\osgeo_utils\auxiliarycopying gdal-utils\osgeo_utils\auxiliary\progress.py -> build\lib.win-amd64-3.8\osgeo_utils\auxiliarycopying gdal-utils\osgeo_utils\auxiliary\raster_creation.py -> build\lib.win-amd64-3.8\osgeo_utils\auxiliarycopying gdal-utils\osgeo_utils\auxiliary\rectangle.py -> build\lib.win-amd64-3.8\osgeo_utils\auxiliarycopying gdal-utils\osgeo_utils\auxiliary\util.py -> build\lib.win-amd64-3.8\osgeo_utils\auxiliarycopying gdal-utils\osgeo_utils\auxiliary\__init__.py -> build\lib.win-amd64-3.8\osgeo_utils\auxiliarycreating build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\assemblepoly.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\build_jp2_from_xml.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\classify.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\crs2crs2grid.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\densify.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\dump_jp2.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\epsg_tr.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\esri2wkt.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\fft.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\fix_gpkg.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\gcps2ogr.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\gcps2vec.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\gcps2wld.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\gdal2grd.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\gdalchksum.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\gdalcopyproj.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\gdalfilter.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\gdalident.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\gdalimport.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\gdalinfo.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\gdallocationinfo.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\gdal_auth.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\gdal_cp.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\gdal_create_pdf.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\gdal_ls.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\gdal_lut.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\gdal_mkdir.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\gdal_remove_towgs84.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\gdal_rm.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\gdal_rmdir.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\gdal_vrtmerge.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\gdal_zip.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\get_soundg.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\histrep.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\hsv_merge.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\jpeg_in_tiff_extract.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\load2odbc.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\loslas2ntv2.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\magphase.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\make_fuzzer_friendly_archive.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\mkgraticule.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\ogr2ogr.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\ogr2vrt.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\ogrinfo.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\ogrupdate.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\ogr_build_junction_table.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\ogr_dispatch.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\ogr_layer_algebra.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\rel.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\tigerpoly.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\tile_extent_from_raster.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\tolatlong.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\validate_cloud_optimized_geotiff.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\validate_gpkg.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\validate_jp2.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\val_repl.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\vec_tr.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\vec_tr_spat.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\wcs_virtds_params.py -> build\lib.win-amd64-3.8\osgeo_utils\samplescopying gdal-utils\osgeo_utils\samples\__init__.py -> build\lib.win-amd64-3.8\osgeo_utils\samplesrunning build_extbuilding 'osgeo._gdal' extensionbuilding 'osgeo._gdalconst' extensionbuilding 'osgeo._osr' extensionbuilding 'osgeo._ogr' extensionbuilding 'osgeo._gnm' extensioncreating build\temp.win-amd64-3.8creating build\temp.win-amd64-3.8\Releasecreating build\temp.win-amd64-3.8\Release\extensionsC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps "-Ic:\program files\python38\include" "-Ic:\program files\python38\include" -I. "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /EHsc /Tpextensions/gdal_wrap.cpp /Fobuild\temp.win-amd64-3.8\Release\extensions/gdal_wrap.objC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps "-Ic:\program files\python38\include" "-Ic:\program files\python38\include" -I. "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /EHsc /Tpextensions/gnm_wrap.cpp /Fobuild\temp.win-amd64-3.8\Release\extensions/gnm_wrap.objC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps "-Ic:\program files\python38\include" "-Ic:\program files\python38\include" -I. "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /Tcextensions/gdalconst_wrap.c /Fobuild\temp.win-amd64-3.8\Release\extensions/gdalconst_wrap.objgnm_wrap.cppgdal_wrap.cppgdalconst_wrap.cC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps "-Ic:\program files\python38\include" "-Ic:\program files\python38\include" -I. "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /EHsc /Tpextensions/ogr_wrap.cpp /Fobuild\temp.win-amd64-3.8\Release\extensions/ogr_wrap.objC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps "-Ic:\program files\python38\include" "-Ic:\program files\python38\include" -I. "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /EHsc /Tpextensions/osr_wrap.cpp /Fobuild\temp.win-amd64-3.8\Release\extensions/osr_wrap.objogr_wrap.cpposr_wrap.cppextensions/gdalconst_wrap.c(3018): fatal error C1083: Cannot open include file: 'gdal.h': No such file or directoryextensions/gdal_wrap.cpp(3191): fatal error C1083: Cannot open include file: 'cpl_port.h': No such file or directoryextensions/gnm_wrap.cpp(3135): fatal error C1083: Cannot open include file: 'gdal.h': No such file or directoryextensions/ogr_wrap.cpp(3153): fatal error C1083: Cannot open include file: 'gdal.h': No such file or directoryextensions/osr_wrap.cpp(3198): fatal error C1083: Cannot open include file: 'cpl_string.h': No such file or directoryerror: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\program files\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Administrator\\AppData\\Local\\Temp\\pip-install-d1sufozs\\gdal\\setup.py'"'"'; __file__='"'"'C:\\Users\\Administrator\\AppData\\Local\\Temp\\pip-install-d1sufozs\\gdal\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Administrator\AppData\Local\Temp\pip-record-q2jdc13d\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\program files\python38\Include\gdal' Check the logs for full command output.
WARNING: You are using pip version 20.2.3; however, version 21.2.4 is available.
You should consider upgrading via the 'c:\program files\python38\python.exe -m pip install --upgrade pip' command.C:\Program Files\Python38>
Answer

I had recently installed GDAL in my windows system in order to install the geopandas package. For that, I went to this website and downloaded the GDAL file with following filename as I am using Python 3.8.8 with Windows 64-bit system:

GDAL‑3.3.1‑cp38‑cp38‑win_amd64.whl

I pasted this *.whl file in the same folder as the terminal. e.g.

C:\Users\XYZ\Documents

Then I went to the Python terminal with the same path as above and typed the following:

pip install GDAL‑3.3.1‑cp38‑cp38‑win_amd64.whl

And it worked for me.

https://en.xdnf.cn/q/119108.html

Related Q&A

Append text to the last line of file with python

First, I use echo hello, >> a.txt to create a new file with one line looks like that. And I know \n is at the last of the line.Then I get some data from python, for example "world", I w…

Python Caesar Cipher [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.Want to improve this question? Update the question so it focuses on one problem only by editing this post.Closed 2…

Indent Expected? [duplicate]

This question already has answers here:Im getting an IndentationError (or a TabError). How do I fix it?(6 answers)Closed 7 months ago.Im sort of new to python and working on a small text adventure its…

Convert QueryDict to key-value pair dictionary

I have a QueryDict that I get from request.POST in this format: <QueryDict: {name: [John], urls: [google.com/\r\nbing.com/\r\naskjeeves.com/], user_email: [[email protected]]}>Why are the values …

How to test items with each other in 2 dimensional list?

We have a 2 dimensional list (for this example we have it populated with unique 6 nodes and 3 masks)myList = [[node1, mask1], [node2, mask1], [node3, mask1], [node4, mask2], [node5, mask2], [node6, mas…

InsecureRequestWarning + MarkupResemblesLocatorWarning:

Id like to scrape a site for my office work. I am learning each day. I need your support guys. Here is the Code: url = https://www.eprocure.gov.bd/partner/ViewTenderPaymentDetails.jsp?payId=33767442&a…

Fetching images from URL and saving on server and/or Table (ImageField)

Im not seeing much documentation on this. Im trying to get an image uploaded onto server from a URL. Ideally Id like to make things simple but Im in two minds as to whether using an ImageField is the b…

Comparing list with a list of lists

I have a list string_array = [1, 2, 3, 4, 5, 6] and a list of lists multi_list = [[1, 2], [2, 3], [2, 4], [4, 5], [5, 6]]The first element of each sub-list in multi_list will have an associated entry …

Cannot save data to database Python

I have a table called category TABLES["category"] = ("""CREATE TABLE category (category_id INTEGER NOT NULL AUTO_INCREMENT,category_name VARCHAR(120) NOT NULL,PRIMARY KEY (cate…

How to generate a permutation of list of lists in python

I have a list of lists say[[2, 4, 6], [2, 6, 10], [2, 12, 22], [4, 6, 8], [4, 8, 12], [6, 8, 10], [8, 10, 12], [8, 15, 22], [10, 11, 12]]How do I generate a combination of the lists for a given length?…