2022年7月14日 星期四

Python 學習筆記 : 安裝 Geopandas 時出現 matadata 問題

前兩天參加公司 "資料視覺化" 內訓時, 老師介紹了一個用來套繪地圖的 geopandas 套件, 但我在安裝時卻出現了如下錯誤訊息 : 

D:\test\python>pip install geopandas   
Collecting geopandas
  Downloading geopandas-0.10.2-py2.py3-none-any.whl (1.0 MB)
     ---------------------------------------- 1.0/1.0 MB 1.3 MB/s eta 0:00:00
Collecting pyproj>=2.2.0
  Downloading pyproj-3.2.1-cp37-cp37m-win_amd64.whl (6.2 MB)
     ---------------------------------------- 6.2/6.2 MB 618.2 kB/s eta 0:00:00
Collecting fiona>=1.8
  Downloading Fiona-1.8.21.tar.gz (1.0 MB)
     ---------------------------------------- 1.0/1.0 MB 766.7 kB/s eta 0:00:00
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [1 lines of output]
      A GDAL API version must be specified. Provide a path to gdal-config using a GDAL_CONFIG environment variable or use a GDAL_VERSION environment variable.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

看來是在安裝相依套件 Fiona 時遇到 GDAL API 版本設定問題, 我找到下面這篇文章, 有人建議去下載 Fiona 的 whl 檔來手動安裝 : 


下載位址如下 :


須依據自己的 Python 版本來下載正確的 whl 檔, 我的是 Python 3.7 64 bits :




但是獨立安裝 Fiona 仍然失敗 : 

D:\test\python>pip install Fiona-1.8.21-cp37-cp37m-win_amd64.whl    
Processing d:\test\python\fiona-1.8.21-cp37-cp37m-win_amd64.whl
Requirement already satisfied: click>=4.0 in c:\python37\lib\site-packages (from Fiona==1.8.21) (7.1.2)
Collecting munch
  Downloading munch-2.5.0-py2.py3-none-any.whl (10 kB)
Collecting click-plugins>=1.0
  Downloading click_plugins-1.1.1-py2.py3-none-any.whl (7.5 kB)
Requirement already satisfied: setuptools in c:\python37\lib\site-packages (from Fiona==1.8.21) (51.0.0)
Requirement already satisfied: six>=1.7 in c:\python37\lib\site-packages (from Fiona==1.8.21) (1.12.0)
Collecting gdal~=3.4.1
  Downloading GDAL-3.4.3.tar.gz (757 kB)
     ---------------------------------------- 757.6/757.6 kB 1.3 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting cligj>=0.5
  Downloading cligj-0.7.2-py3-none-any.whl (7.1 kB)
Requirement already satisfied: attrs>=17 in c:\python37\lib\site-packages (from Fiona==1.8.21) (19.3.0)
Requirement already satisfied: certifi in c:\python37\lib\site-packages (from Fiona==1.8.21) (2018.11.29)
Building wheels for collected packages: gdal
  Building wheel for gdal (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [118 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-3.7
      creating build\lib.win-amd64-3.7\osgeo
      copying osgeo\gdal.py -> build\lib.win-amd64-3.7\osgeo
      copying osgeo\gdalconst.py -> build\lib.win-amd64-3.7\osgeo
      copying osgeo\gdalnumeric.py -> build\lib.win-amd64-3.7\osgeo
      copying osgeo\gdal_array.py -> build\lib.win-amd64-3.7\osgeo
      copying osgeo\gnm.py -> build\lib.win-amd64-3.7\osgeo
      copying osgeo\ogr.py -> build\lib.win-amd64-3.7\osgeo
      copying osgeo\osr.py -> build\lib.win-amd64-3.7\osgeo
      copying osgeo\utils.py -> build\lib.win-amd64-3.7\osgeo
      copying osgeo\__init__.py -> build\lib.win-amd64-3.7\osgeo
      creating build\lib.win-amd64-3.7\osgeo_utils
      copying gdal-utils\osgeo_utils\gdal2tiles.py -> build\lib.win-amd64-3.7\osgeo_utils
      copying gdal-utils\osgeo_utils\gdal2xyz.py -> build\lib.win-amd64-3.7\osgeo_utils
      copying gdal-utils\osgeo_utils\gdalattachpct.py -> build\lib.win-amd64-3.7\osgeo_utils
      copying gdal-utils\osgeo_utils\gdalcompare.py -> build\lib.win-amd64-3.7\osgeo_utils
      copying gdal-utils\osgeo_utils\gdalmove.py -> build\lib.win-amd64-3.7\osgeo_utils
      copying gdal-utils\osgeo_utils\gdal_calc.py -> build\lib.win-amd64-3.7\osgeo_utils
      copying gdal-utils\osgeo_utils\gdal_edit.py -> build\lib.win-amd64-3.7\osgeo_utils
      copying gdal-utils\osgeo_utils\gdal_fillnodata.py -> build\lib.win-amd64-3.7\osgeo_utils
      copying gdal-utils\osgeo_utils\gdal_merge.py -> build\lib.win-amd64-3.7\osgeo_utils
      copying gdal-utils\osgeo_utils\gdal_pansharpen.py -> build\lib.win-amd64-3.7\osgeo_utils
      copying gdal-utils\osgeo_utils\gdal_polygonize.py -> build\lib.win-amd64-3.7\osgeo_utils
      copying gdal-utils\osgeo_utils\gdal_proximity.py -> build\lib.win-amd64-3.7\osgeo_utils
      copying gdal-utils\osgeo_utils\gdal_retile.py -> build\lib.win-amd64-3.7\osgeo_utils
      copying gdal-utils\osgeo_utils\gdal_sieve.py -> build\lib.win-amd64-3.7\osgeo_utils
      copying gdal-utils\osgeo_utils\ogrmerge.py -> build\lib.win-amd64-3.7\osgeo_utils
      copying gdal-utils\osgeo_utils\pct2rgb.py -> build\lib.win-amd64-3.7\osgeo_utils
      copying gdal-utils\osgeo_utils\rgb2pct.py -> build\lib.win-amd64-3.7\osgeo_utils
      copying gdal-utils\osgeo_utils\__init__.py -> build\lib.win-amd64-3.7\osgeo_utils
      creating build\lib.win-amd64-3.7\osgeo_utils\auxiliary
      copying gdal-utils\osgeo_utils\auxiliary\array_util.py -> build\lib.win-amd64-3.7\osgeo_utils\auxiliary
      copying gdal-utils\osgeo_utils\auxiliary\base.py -> build\lib.win-amd64-3.7\osgeo_utils\auxiliary
      copying gdal-utils\osgeo_utils\auxiliary\batch_creator.py -> build\lib.win-amd64-3.7\osgeo_utils\auxiliary
      copying gdal-utils\osgeo_utils\auxiliary\color_palette.py -> build\lib.win-amd64-3.7\osgeo_utils\auxiliary
      copying gdal-utils\osgeo_utils\auxiliary\color_table.py -> build\lib.win-amd64-3.7\osgeo_utils\auxiliary
      copying gdal-utils\osgeo_utils\auxiliary\extent_util.py -> build\lib.win-amd64-3.7\osgeo_utils\auxiliary
      copying gdal-utils\osgeo_utils\auxiliary\gdal_argparse.py -> build\lib.win-amd64-3.7\osgeo_utils\auxiliary
      copying gdal-utils\osgeo_utils\auxiliary\numpy_util.py -> build\lib.win-amd64-3.7\osgeo_utils\auxiliary
      copying gdal-utils\osgeo_utils\auxiliary\osr_util.py -> build\lib.win-amd64-3.7\osgeo_utils\auxiliary
      copying gdal-utils\osgeo_utils\auxiliary\progress.py -> build\lib.win-amd64-3.7\osgeo_utils\auxiliary
      copying gdal-utils\osgeo_utils\auxiliary\raster_creation.py -> build\lib.win-amd64-3.7\osgeo_utils\auxiliary
      copying gdal-utils\osgeo_utils\auxiliary\rectangle.py -> build\lib.win-amd64-3.7\osgeo_utils\auxiliary
      copying gdal-utils\osgeo_utils\auxiliary\util.py -> build\lib.win-amd64-3.7\osgeo_utils\auxiliary
      copying gdal-utils\osgeo_utils\auxiliary\__init__.py -> build\lib.win-amd64-3.7\osgeo_utils\auxiliary
      creating build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\assemblepoly.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\build_jp2_from_xml.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\classify.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\crs2crs2grid.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\densify.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\dump_jp2.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\epsg_tr.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\esri2wkt.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\fft.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\fix_gpkg.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\gcps2ogr.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\gcps2vec.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\gcps2wld.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\gdal2grd.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\gdalchksum.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\gdalcopyproj.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\gdalfilter.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\gdalident.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\gdalimport.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\gdalinfo.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\gdallocationinfo.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\gdal_auth.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\gdal_cp.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\gdal_create_pdf.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\gdal_ls.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\gdal_lut.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\gdal_mkdir.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\gdal_remove_towgs84.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\gdal_rm.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\gdal_rmdir.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\gdal_vrtmerge.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\gdal_zip.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\get_soundg.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\histrep.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\hsv_merge.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\jpeg_in_tiff_extract.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\load2odbc.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\loslas2ntv2.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\magphase.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\make_fuzzer_friendly_archive.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\mkgraticule.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\ogr2ogr.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\ogr2vrt.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\ogrinfo.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\ogrupdate.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\ogr_build_junction_table.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\ogr_dispatch.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\ogr_layer_algebra.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\rel.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\tigerpoly.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\tile_extent_from_raster.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\tolatlong.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\validate_cloud_optimized_geotiff.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\validate_gpkg.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\validate_jp2.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\val_repl.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\vec_tr.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\vec_tr_spat.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\wcs_virtds_params.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\__init__.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      running build_ext
      building 'osgeo._gdal' extension
      building 'osgeo._gdalconst' extension
      building 'osgeo._osr' extension
      building 'osgeo._ogr' extension
      building 'osgeo._gnm' extension
      building 'osgeo._gdal_array' extension
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for gdal
  Running setup.py clean for gdal
Failed to build gdal
Installing collected packages: munch, gdal, cligj, click-plugins, Fiona
  Running setup.py install for gdal ... error
  error: subprocess-exited-with-error

  × Running setup.py install for gdal did not run successfully.
  │ exit code: 1
  ╰─> [118 lines of output]
      running install
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-3.7
      creating build\lib.win-amd64-3.7\osgeo
      copying osgeo\gdal.py -> build\lib.win-amd64-3.7\osgeo
      copying osgeo\gdalconst.py -> build\lib.win-amd64-3.7\osgeo
      copying osgeo\gdalnumeric.py -> build\lib.win-amd64-3.7\osgeo
      copying osgeo\gdal_array.py -> build\lib.win-amd64-3.7\osgeo
      copying osgeo\gnm.py -> build\lib.win-amd64-3.7\osgeo
      copying osgeo\ogr.py -> build\lib.win-amd64-3.7\osgeo
      copying osgeo\osr.py -> build\lib.win-amd64-3.7\osgeo
      copying osgeo\utils.py -> build\lib.win-amd64-3.7\osgeo
      copying osgeo\__init__.py -> build\lib.win-amd64-3.7\osgeo
      creating build\lib.win-amd64-3.7\osgeo_utils
      copying gdal-utils\osgeo_utils\gdal2tiles.py -> build\lib.win-amd64-3.7\osgeo_utils
      copying gdal-utils\osgeo_utils\gdal2xyz.py -> build\lib.win-amd64-3.7\osgeo_utils
      copying gdal-utils\osgeo_utils\gdalattachpct.py -> build\lib.win-amd64-3.7\osgeo_utils
      copying gdal-utils\osgeo_utils\gdalcompare.py -> build\lib.win-amd64-3.7\osgeo_utils
      copying gdal-utils\osgeo_utils\gdalmove.py -> build\lib.win-amd64-3.7\osgeo_utils
      copying gdal-utils\osgeo_utils\gdal_calc.py -> build\lib.win-amd64-3.7\osgeo_utils
      copying gdal-utils\osgeo_utils\gdal_edit.py -> build\lib.win-amd64-3.7\osgeo_utils
      copying gdal-utils\osgeo_utils\gdal_fillnodata.py -> build\lib.win-amd64-3.7\osgeo_utils
      copying gdal-utils\osgeo_utils\gdal_merge.py -> build\lib.win-amd64-3.7\osgeo_utils
      copying gdal-utils\osgeo_utils\gdal_pansharpen.py -> build\lib.win-amd64-3.7\osgeo_utils
      copying gdal-utils\osgeo_utils\gdal_polygonize.py -> build\lib.win-amd64-3.7\osgeo_utils
      copying gdal-utils\osgeo_utils\gdal_proximity.py -> build\lib.win-amd64-3.7\osgeo_utils
      copying gdal-utils\osgeo_utils\gdal_retile.py -> build\lib.win-amd64-3.7\osgeo_utils
      copying gdal-utils\osgeo_utils\gdal_sieve.py -> build\lib.win-amd64-3.7\osgeo_utils
      copying gdal-utils\osgeo_utils\ogrmerge.py -> build\lib.win-amd64-3.7\osgeo_utils
      copying gdal-utils\osgeo_utils\pct2rgb.py -> build\lib.win-amd64-3.7\osgeo_utils
      copying gdal-utils\osgeo_utils\rgb2pct.py -> build\lib.win-amd64-3.7\osgeo_utils
      copying gdal-utils\osgeo_utils\__init__.py -> build\lib.win-amd64-3.7\osgeo_utils
      creating build\lib.win-amd64-3.7\osgeo_utils\auxiliary
      copying gdal-utils\osgeo_utils\auxiliary\array_util.py -> build\lib.win-amd64-3.7\osgeo_utils\auxiliary
      copying gdal-utils\osgeo_utils\auxiliary\base.py -> build\lib.win-amd64-3.7\osgeo_utils\auxiliary
      copying gdal-utils\osgeo_utils\auxiliary\batch_creator.py -> build\lib.win-amd64-3.7\osgeo_utils\auxiliary
      copying gdal-utils\osgeo_utils\auxiliary\color_palette.py -> build\lib.win-amd64-3.7\osgeo_utils\auxiliary
      copying gdal-utils\osgeo_utils\auxiliary\color_table.py -> build\lib.win-amd64-3.7\osgeo_utils\auxiliary
      copying gdal-utils\osgeo_utils\auxiliary\extent_util.py -> build\lib.win-amd64-3.7\osgeo_utils\auxiliary
      copying gdal-utils\osgeo_utils\auxiliary\gdal_argparse.py -> build\lib.win-amd64-3.7\osgeo_utils\auxiliary
      copying gdal-utils\osgeo_utils\auxiliary\numpy_util.py -> build\lib.win-amd64-3.7\osgeo_utils\auxiliary
      copying gdal-utils\osgeo_utils\auxiliary\osr_util.py -> build\lib.win-amd64-3.7\osgeo_utils\auxiliary
      copying gdal-utils\osgeo_utils\auxiliary\progress.py -> build\lib.win-amd64-3.7\osgeo_utils\auxiliary
      copying gdal-utils\osgeo_utils\auxiliary\raster_creation.py -> build\lib.win-amd64-3.7\osgeo_utils\auxiliary
      copying gdal-utils\osgeo_utils\auxiliary\rectangle.py -> build\lib.win-amd64-3.7\osgeo_utils\auxiliary
      copying gdal-utils\osgeo_utils\auxiliary\util.py -> build\lib.win-amd64-3.7\osgeo_utils\auxiliary
      copying gdal-utils\osgeo_utils\auxiliary\__init__.py -> build\lib.win-amd64-3.7\osgeo_utils\auxiliary
      creating build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\assemblepoly.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\build_jp2_from_xml.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\classify.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\crs2crs2grid.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\densify.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\dump_jp2.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\epsg_tr.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\esri2wkt.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\fft.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\fix_gpkg.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\gcps2ogr.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\gcps2vec.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\gcps2wld.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\gdal2grd.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\gdalchksum.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\gdalcopyproj.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\gdalfilter.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\gdalident.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\gdalimport.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\gdalinfo.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\gdallocationinfo.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\gdal_auth.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\gdal_cp.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\gdal_create_pdf.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\gdal_ls.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\gdal_lut.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\gdal_mkdir.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\gdal_remove_towgs84.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\gdal_rm.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\gdal_rmdir.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\gdal_vrtmerge.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\gdal_zip.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\get_soundg.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\histrep.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\hsv_merge.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\jpeg_in_tiff_extract.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\load2odbc.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\loslas2ntv2.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\magphase.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\make_fuzzer_friendly_archive.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\mkgraticule.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\ogr2ogr.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\ogr2vrt.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\ogrinfo.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\ogrupdate.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\ogr_build_junction_table.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\ogr_dispatch.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\ogr_layer_algebra.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\rel.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\tigerpoly.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\tile_extent_from_raster.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\tolatlong.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\validate_cloud_optimized_geotiff.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\validate_gpkg.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\validate_jp2.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\val_repl.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\vec_tr.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\vec_tr_spat.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\wcs_virtds_params.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      copying gdal-utils\osgeo_utils\samples\__init__.py -> build\lib.win-amd64-3.7\osgeo_utils\samples
      running build_ext
      building 'osgeo._gdal' extension
      building 'osgeo._gdalconst' extension
      building 'osgeo._osr' extension
      building 'osgeo._ogr' extension
      building 'osgeo._gnm' extension
      building 'osgeo._gdal_array' extension
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> gdal

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

目前還沒有解決辦法, 先記下來有空再來研究看看. 

沒有留言 :