Python|geopandas包安装教程
通过geopandas分析json文件更方便快捷。本教程适用于无法通过一键“pip install geopandas”来安装geopandas包的情况。
安装步骤
1.安装4个依赖包
(1)在以下网站上找到需要安装的四个依赖包:shapely、pyproj、gdal、fiona,根据自己python的版本选择适合你的版本:
https://www.lfd.uci.edu/~gohlke/pythonlibs/ (这网站现在进不去了,可以转到 https://pypi.org/ 这里下载)
(2)打开cmd或者anaconda prompt,用“pip install”依次安装gdal、Fiona、Pyproj、shapely
PS:如果下载的版本和机型不匹配的话会弹出以下ERROR:
代码如下(示例):
C:\Users\dell>pip install C:\Users\dell\Desktop\杂七杂八临时文件\GDAL-3.2.1-cp38-cp38-win_amd64.whl
ERROR: GDAL-3.2.1-cp38-cp38-win_amd64.whl is not a supported wheel on this platform.
再重新下载其他版本即可。
(3)四个依赖包安装成功:
代码如下(示例):
C:\Users\dell>pip install C:\Users\dell\Desktop\geopandas\GDAL-3.3.3-cp39-cp39-win_amd64.whl
Processing c:\users\dell\desktop\geopandas\gdal-3.3.3-cp39-cp39-win_amd64.whl
Installing collected packages: GDAL
Successfully installed GDAL-3.3.3
C:\Users\dell>pip install C:\Users\dell\Desktop\geopandas\Fiona-1.8.20-cp39-cp39-win_amd64.whl
Processing c:\users\dell\desktop\geopandas\fiona-1.8.20-cp39-cp39-win_amd64.whl
Collecting click-plugins>=1.0
Using cached click_plugins-1.1.1-py2.py3-none-any.whl (7.5 kB)
Collecting cligj>=0.5
Downloading cligj-0.7.2-py3-none-any.whl (7.1 kB)
Requirement already satisfied: setuptools in c:\users\dell\anaconda3\lib\site-packages (from Fiona==1.8.20) (58.0.4)
Collecting munch
Using cached munch-