Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/337.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
IPython无法导入Geopandas_Python_Pandas_Numpy_Conda_Geopandas - Fatal编程技术网

IPython无法导入Geopandas

IPython无法导入Geopandas,python,pandas,numpy,conda,geopandas,Python,Pandas,Numpy,Conda,Geopandas,从conda forge成功安装conda软件包后,如下所示: conda install -c conda-forge geopandas 当我尝试在IPython(Jupyter笔记本)中导入它时,使用: 我始终接受以下错误,尽管已经安装了所有的依赖项(NUMPY、熊猫、Saby、菲奥娜、六、PYPROJ): --------------------------------------------------------------------- ------ ImportError

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

conda install -c conda-forge geopandas
当我尝试在IPython(Jupyter笔记本)中导入它时,使用:

我始终接受以下错误,尽管已经安装了所有的依赖项(NUMPY、熊猫、Saby、菲奥娜、六、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
---------------------------------------------------------------------
------
ImportError回溯(最近的呼叫)
最后)
在()
4将matplotlib.mlab导入为mlab
5.
---->6作为gpd导入GeoPanda
7作为sns导入seaborn
8从sklearn导入预处理
//anaconda/lib/python2.7/site packages/geopandas/_init__;u.py in()
---->1从geopandas.geoseries导入geoseries
2从geopandas.geodataframe导入geodataframe
3.
4从geopandas.io.file导入读取文件
5从geopandas.io.sql导入读取
//anaconda/lib/python2.7/site-packages/geopandas/geoseries.py in()
6来自熊猫进口系列,数据帧
7从pandas.core.indexing导入\u NDFrameIndexer
---->8从pandas.util.decorators导入缓存\u只读
9进口pyproj
10从shapely.geometry导入框、形状、多边形、点
ImportError:没有名为decorators的模块

关于可能导致错误的原因有什么建议吗?

为了让Jeff的评论更加突出,这一点在pandas 0.20.1中得到了修正。

因此,通常情况下,如果您现在安装的是最新的pandas版本(不是0.20.0),则不应出现此错误。

将pandas更新为0.20.1,这将得到解决谢谢,更新为0.20.1解决了此问题(0.2.1)-我不知道编号约定:0.20.1和0.2.1是否相同?这仍然发生在0.2.1中,我得到了相同的错误:导入geopandas作为gpd回溯(上次调用):文件“”,第1行,文件“\geopandas.py”,第12行,从geopandas导入GeoSeries,GeoDataFrame导入错误:无法导入名称GeoSeries
---------------------------------------------------------------------
------
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