从conda-forge成功安装Geopandas conda包后,如下所示:
conda install -c conda-forge geopandas当我尝试将其导入IPython (Jupyter notebook)时,使用:
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对可能导致错误的原因有什么建议吗?
发布于 2017-05-12 05:56:21
为了让Jeff的评论更加突出,这在pandas 0.20.1中得到了修复。
因此,通常情况下,如果您现在安装的是最新的pandas版本(不是0.20.0),您应该不会收到此错误。
https://stackoverflow.com/questions/43815654
复制相似问题