我正在尝试在脚本中导入geopandas,但始终出现以下错误:
Traceback (most recent call last):
File "C:/Users/USERNAME/Desktop/Scripts/Project1/folium_map/89. geographical chart 4.py", line 1, in <module>
import geopandas
File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python37\lib\site-packages\geopandas\__init__.py", line 1, in <module>
from geopandas.geoseries import GeoSeries
File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python37\lib\site-packages\geopandas\geoseries.py", line 12, in <module>
from geopandas.base import GeoPandasBase, _series_unary_op, _CoordinateIndexer
File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python37\lib\site-packages\geopandas\base.py", line 14, in <module>
from rtree.core import RTreeError
File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python37\lib\site-packages\rtree\__init__.py", line 1, in <module>
from .index import Rtree
File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python37\lib\site-packages\rtree\index.py", line 5, in <module>
from . import core
File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python37\lib\site-packages\rtree\core.py", line 133, in <module>
rt.Error_GetLastErrorNum.restype = ctypes.c_int
File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python37\lib\ctypes\__init__.py", line 369, in __getattr__
func = self.__getitem__(name)
File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python37\lib\ctypes\__init__.py", line 374, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'Error_GetLastErrorNum' not found
我的代码如下:
import geopandas
之前是否有人收到过此错误?如果是这样,他们如何解决?提前致谢。
EDIT 05/02/19:
我还安装了GDAL 2.3.3 amd64。