jupyter-notebook - 导入 geopandas 时出现 jupyter 错误
问题描述
想问一下,每当我尝试在 jupyter 上导入 geopandas 时,我该如何解决该错误。以下是显示给我的错误消息。我的笔记本电脑在 Python 3 和 Windows 上运行。提前致谢!
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
<ipython-input-1-fc7d1d298f0c> in <module>
----> 1 import geopandas
~\anaconda3\anaconda\lib\site-packages\geopandas\__init__.py in <module>
----> 1 from geopandas.geoseries import GeoSeries # noqa
2 from geopandas.geodataframe import GeoDataFrame # noqa
3 from geopandas.array import _points_from_xy as points_from_xy # noqa
4
5 from geopandas.io.file import read_file # noqa
~\anaconda3\anaconda\lib\site-packages\geopandas\geoseries.py in <module>
10
11 import pyproj
---> 12 from shapely.geometry.base import BaseGeometry
13 from shapely.ops import transform
14
~\anaconda3\anaconda\lib\site-packages\shapely\geometry\__init__.py in <module>
2 """
3
----> 4 from .base import CAP_STYLE, JOIN_STYLE
5 from .geo import box, shape, asShape, mapping
6 from .point import Point, asPoint
~\anaconda3\anaconda\lib\site-packages\shapely\geometry\base.py in <module>
16
17 from shapely.affinity import affine_transform
---> 18 from shapely.coords import CoordinateSequence
19 from shapely.errors import WKBReadingError, WKTReadingError
20 from shapely.geos import WKBWriter, WKTWriter
~\anaconda3\anaconda\lib\site-packages\shapely\coords.py in <module>
6 from ctypes import byref, c_double, c_uint
7
----> 8 from shapely.geos import lgeos
9 from shapely.topology import Validating
10
~\anaconda3\anaconda\lib\site-packages\shapely\geos.py in <module>
143 if os.getenv('CONDA_PREFIX', ''):
144 # conda package.
--> 145 _lgeos = CDLL(os.path.join(sys.prefix, 'Library', 'bin', 'geos_c.dll'))
146 else:
147 try:
~\anaconda3\anaconda\lib\ctypes\__init__.py in __init__(self, name, mode, handle, use_errno, use_last_error)
362
363 if handle is None:
--> 364 self._handle = _dlopen(self._name, mode)
365 else:
366 self._handle = handle
OSError: [WinError 126] The specified module could not be found
错误是发布的错误,我已经使用了几种方法,例如从该站点https://www.lfd.uci.edu/~gohlke/pythonlibs/#fiona下载 whl 文件,但错误仍然存在。
解决方案
推荐阅读
- spyder - 使用 Spyder IDE 时如何将文件插入另一个文件?
- javascript - Frida - 使用 unicode 挂钩 android 方法
- java - 从 spring 重定向 url 中删除项目名称前缀
- python - geodataframe.to_file 无效的字段类型
- topshelf - 调试 topshelf 即服务
- swift - 旋转后未正确检测到 SCNNode 平面
- vb.net - VB判断一个数是否为素数的最快方法
- google-cloud-platform - 如何在 GCP 中登录/SSH 到 Dataflow VM 工作人员?
- c# - 非托管导出未显示在 DLL 中
- pytorch - 火炬张量的 sum 和 torch.sum 有什么区别?