可以整形但不能整形地导入。几何

时间:2018-08-02 11:21:15

标签: python python-3.x installation windows-server-2012-r2 shapely

使用import shapely不会返回任何错误,但是使用import shapely.geometryfrom shapely import geometry会返回以下错误:

Traceback (most recent call last):
  File "C:\Python36\lib\site-packages\shapely\geos.py", line 120, in <module>
    os.path.dirname(__file__), "DLLs", "geos_c.dll")))
  File "C:\Python36\lib\ctypes\__init__.py", line 348, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python36\lib\site-packages\shapely\geometry\__init__.py", line 4, in <module>
    from .base import CAP_STYLE, JOIN_STYLE
  File "C:\Python36\lib\site-packages\shapely\geometry\base.py", line 17, in <module>
    from shapely.coords import CoordinateSequence
  File "C:\Python36\lib\site-packages\shapely\coords.py", line 8, in <module>
    from shapely.geos import lgeos
  File "C:\Python36\lib\site-packages\shapely\geos.py", line 122, in <module>
    _lgeos = CDLL("geos_c.dll")
  File "C:\Python36\lib\ctypes\__init__.py", line 348, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found

打开Python解释器会打印出Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 17:00:18) [MSC v.1900 64 bit (AMD64)] on win32,因此我使用Shapely‑1.6.4.post1‑cp36‑cp36m‑win_amd64.whlhttps://www.lfd.uci.edu/~gohlke/pythonlibs/#shapely下载并安装了pip文件

我的C:\Python36\Lib\site-packages目录包含文件夹shapelyShapely-1.6.4.post1.dist-info,并且确实存在geometry子文件夹,这使我相信该软件包确实安装正确。

shapely folder

0 个答案:

没有答案