新手python安装geopandas

第一种方法(尝试失败)

直接安装 安装不上

本地python或者anaconda prompt使用pip install geopandas

第二种方法(尝试成功)

1.先下载四个依赖包,再pip 安装

登录网址,要用科学上网登录网址,不然打不开

https://www.lfd.uci.edu/~gohlke/pythonlibs/

下载时,选择和python版本匹配的兼容包

python2.7.x对应的版本是cp27,python3.6.x对应的版本是cp36>

安装GDAL时,报错:GDAL-3.0.2-cp37-cp37m-win32.whl is not a supported wheel on this platform.的解决方法

需要下载的库文件有:Fiona、GDAL、pyproj、Rtree、 Shapely

安装依赖包(我没用 anaconda)

pip install whl文件所在路径
或者
直接用cd打开文件所在的位置然后使用pip Install 进行安装

安装时无特定顺序,不过需注意GDAL要在Fiona前安装。

python3.5安装geopandas
【库安装】geopandas安装
Python|安装geopandas教程——以四个依赖包为例

Python首次安装geopandas教程
conda安装geopandas两种方法

2.安装geopandas

pip install geopandas

3.测试安装是否完成
参考链接

import geopandas
import matplotlib.pyplot as plt
 
if __name__ == '__main__':
    world = geopandas.read_file(geopandas.datasets.get_path('naturalearth_lowres'))
    world.plot()
    plt.show()

你可能感兴趣的:(安装,python)