2017-05-06 35 views
1

成功地從康達鍛安裝Geopandas暢達包後如下:IPython的無法導入Geopandas

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 

有關可能導致錯誤的任何建議?

+1

更新大熊貓到0.20.1,這將被固定 – Jeff

+0

謝謝,更新到0.20.1解決了它 –

+1

我仍然有(0.2.1)這個問題 - 我不知道編號約定:是0.20.1和0.2.1一樣嗎? –

回答

1

爲了讓傑夫的評論更加突出,這在熊貓0.20.1中得到了解決。
所以通常情況下,如果你現在安裝最新的熊貓版本(不是0.20.0),你不應該得到這個錯誤。

+1

這還是發生在0.2.1,我得到了同樣的錯誤:M端口geopandas爲GPD 回溯(最近通話最後一個):「\ geopandas.py」 文件「」,1號線,在 文件,行12,in from geopandas import GeoSeries,GeoDataFrame ImportError:無法導入名稱GeoSeries –