安装 Shapely:OSError:\[WinError 126\] 找不到指定的模块

新手上路,请多包涵

我必须安装 Shapely 包( http://toblerity.org/shapely/project.html#installation )。但是当我使用时:

 pip install Shapely

我收到此错误:

 Collecting Shapely
  Using cached Shapely-1.5.17.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\AppData\Local\Temp\pip-build-mwuxcain\Shapely\setup.py", line 38, in <module>
        from shapely._buildcfg import geos_version_string, geos_version, \
      File "C:\Users\AppData\Local\Temp\pip-build-mwuxcain\Shapely\shapely_buildcfg.py", line 200, in <module>
        lgeos = CDLL("geos.dll")
      File "C:\Users\Anaconda3\lib\ctypes__init__.py", line 344, in __init__
        self._handle = _dlopen(self._name, mode)
    OSError: [WinError 126] The specified module could not be found

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\AppData\Local\Temp\pip-build-mwuxcain\Shapely\

而且,当我使用时:

 conda install shapely

我收到此错误:

 Fetching package metadata ...........

PackageNotFoundError: Package not found: Conda could not find '

我在 Windows 10(64 位)上使用 Python 3.6.0 (Anaconda3)。

请帮忙。 (没有任何作用)

原文由 Beginner 发布,翻译遵循 CC BY-SA 4.0 许可协议

阅读 862
2 个回答

您也可以使用

conda install -c conda-forge shapely

它对我有用。

原文由 Dr. H. Lecter 发布,翻译遵循 CC BY-SA 4.0 许可协议

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题