简体   繁体   English

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

[英]Install Shapely: OSError: [WinError 126] The specified module could not be found

I have to install Shapely package ( http://toblerity.org/shapely/project.html#installation ).我必须安装 Shapely 包( http://toblerity.org/shapely/project.html#installation )。 But when I am using:但是当我使用:

pip install Shapely

I am getting this error:我收到此错误:

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\

And, when I am using:而且,当我使用:

conda install shapely

I am getting this error:我收到此错误:

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


PackageNotFoundError: Package not found: Conda could not find '

I am using Python 3.6.0 (Anaconda3) on Windows 10 (64-bit).我在 Windows 10(64 位)上使用 Python 3.6.0 (Anaconda3)。

Please help.请帮忙。 (nothing works) (没有任何效果)

Download WHL file using http://www.lfd.uci.edu/~gohlke/pythonlibs/#shapely使用http://www.lfd.uci.edu/~gohlke/pythonlibs/#shapely下载 WHL 文件

Install:安装:

python -m pip install Shapely-1.5.17-cp36-cp36m-win_amd64.whl

Ubuntu: Ubuntu:

pip install shapely==1.6b2

You can also use你也可以使用

conda install -c conda-forge shapely

It worked for me.它对我有用。

Solution which worked for me (Windows Server):对我有用的解决方案(Windows Server):

  1. Install osgeo4w from https://trac.osgeo.org/osgeo4w/https://trac.osgeo.org/osgeo4w/安装 osgeo4w

  2. copy geos_c.dll and geos.dll to C:\\ProgramData\\Anaconda3\\Library\\bin将 geos_c.dll 和 geos.dll 复制到 C:\\ProgramData\\Anaconda3\\Library\\bin

pip install shapely不起作用,但conda install shapely对我来说很好用(windows 用户)

https://www.programmersought.com/article/70235795361/

copy "[env path]\LIb\site-packages\shapely\DLLs\geos*.dll" to "[env path]\Library\bin"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 OSError: [WinError 126] 找不到指定的模块? - OSError: [WinError 126] The specified module could not be found? nidaqmx.Task: (OSError: [WinError 126] The specified module could not be found) - nidaqmx.Task: (OSError: [WinError 126] The specified module could not be found) OSError: [WinError 126] Python中找不到指定的模块 - OSError: [WinError 126] The specified module could not be found in Python Pycharm 错误 - OSError: [WinError 126] 找不到指定的模块 - Pycharm error - OSError: [WinError 126] The specified module could not be found 错误ctypes OSError:[WinError 126]找不到指定的模块 - error ctypes OSError: [WinError 126] The specified module could not be found “OSError: [WinError 126] 找不到指定的模块”使用 pvfactors 库 - "OSError: [WinError 126] The specified module could not be found" using pvfactors library OSError: [WinError 126] 在 pyinstaller 中找不到指定的模块 - OSError: [WinError 126] The specified module could not be found in pyinstaller Keras 错误 OSError: [WinError 126] 找不到指定的模块 - Keras Error OSError: [WinError 126] The specified module could not be found 导入隐藏OSError:[WinError 126]找不到指定的模块 - Import hid OSError: [WinError 126] The specified module could not be found OSError:[WinError 126]找不到在Pycharm中导入mxnet的指定模块 - OSError: [WinError 126] The specified module could not be found importing mxnet in Pycharm
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM