一、相应包下载安装
- 本人根据python版本、系统版本,多次尝试不同版本GDAL 、Fiona 安装
-
感谢主终于成功啦
二、常见错误
-
error: Microsoft Visual C++ 14.0 or greater is required. Get it with “Microsoft C++ Build Tools“
VisualCppBuildTools下载、解压、安装
Visual Studio 2015 用方式安装则报错 -
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.
解决
-
fiona/_transform.cpp(606): fatal error C1083: Cannot open include file: 'cpl_conv.h': No such file or directory error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe' failed with exit status 2
解决 根据python版本与系统多次尝试不同版本fiona安装
-
UserWarning: Unknown distribution option: 'use_2to3_fixers' UserWarning: Unknown distribution option: 'use_2to3_exclude_fixers' warnings.warn(msg)
解决 下载的whl版本错误
三、心酸历程
- ①首先
pip install geopandas
果断报错error: Microsoft Visual C++ 14.0 or greater is required. Get it with “Microsoft C++ Build Tools
- ②安装
VisualCppBuildTools
15版本,pip install gdal
安装后仍报错,后查资料仅.whl 格式安装 - ③ 于是下载gdal.whl 格式,根据系统与python 版本出现平台不支持格式。
- ④ 每个版本都测试一下,终于安装gdal成功
(你以为成功啦,高兴太早啦)
- ⑤ fiona进行
pip install fiona
然后各种报错。又进行 fiona.whl
支持各版本重试又是各种报错设置 set GDAL_DATA
、cpl_conv.h
又是两个错误。 -
pip install fiona***.whl
报错,试了各版本终于成功。 -
中间省略10个坑
error: Microsoft Visual C++ 14.0 or greater is required. Get it with “Microsoft C++ Build Tools“: