IPython无法导入Geopandas

问题描述 投票:1回答:1

从conda-forge成功安装Geopandas conda软件包后,如下所示:

conda install -c conda-forge geopandas

当我尝试在IPython(Jupyter笔记本)中导入它时,使用:

import geopandas as gpd

我一直收到以下错误,尽管安装了所有依赖项(numpy,pandas,shapely,fiona,six,pyproj)并且是最新的:

---------------------------------------------------------------------
------
ImportError                               Traceback (most recent call 
last)
<ipython-input-1-13760ce748ee> in <module>()
      4 import matplotlib.mlab as mlab
      5 
----> 6 import geopandas as gpd
      7 import seaborn as sns
      8 from sklearn import preprocessing

    //anaconda/lib/python2.7/site-packages/geopandas/__init__.py in <module>()
----> 1 from geopandas.geoseries import GeoSeries
      2 from geopandas.geodataframe import GeoDataFrame
      3 
      4 from geopandas.io.file import read_file
      5 from geopandas.io.sql import read_postgis

//anaconda/lib/python2.7/site-packages/geopandas/geoseries.py in <module>()
      6 from pandas import Series, DataFrame
      7 from pandas.core.indexing import _NDFrameIndexer
----> 8 from pandas.util.decorators import cache_readonly
      9 import pyproj
      10 from shapely.geometry import box, shape, Polygon, Point

ImportError: No module named decorators

有关可能导致错误的原因的任何建议?

python pandas numpy conda geopandas
1个回答
1
投票

为了使杰夫的评论更加突出,这在大熊猫0.20.1中得到了修复。 通常,如果您现在安装最新的pandas版本(不是0.20.0),则不应该出现此错误。

© www.soinside.com 2019 - 2024. All rights reserved.