什么时候安装imgaug.py我收到此错误

时间:2019-07-30 08:52:07

标签: python opencv cmd python-imaging-library iot

这是关于我的问题的图片。我完全被困住了。 https://ibb.co/hCx74JV

C:\Users\Staj>pip install imgaug
Collecting imgaug
  Using cached https://files.pythonhosted.org/packages/17/a9/36de8c0e1ffb2d86f871cac60e5caa910cbbdb5f4741df5ef856c47f4445/imgaug-0.2.9-py2.py3-none-any.whl
Requirement already satisfied: Pillow in e:\python\lib\site-packages (from imgaug) (5.4.1)
Collecting scikit-image>=0.11.0 (from imgaug)
  Using cached https://files.pythonhosted.org/packages/79/16/c5a36a03f90d4a246791d4ff1879f1868e1c5db58fac9f03427395c5e2d6/scikit_image-0.15.0-cp37-none-win_amd64.whl
Requirement already satisfied: six in e:\python\lib\site-packages (from imgaug) (1.12.0)
Collecting Shapely (from imgaug)
  Using cached https://files.pythonhosted.org/packages/a2/fb/7a7af9ef7a35d16fa23b127abee272cfc483ca89029b73e92e93cdf36e6b/Shapely-1.6.4.post2.tar.gz
    ERROR: Command errored out with exit status 1:
     command: 'e:\python\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Staj\\AppData\\Local\\Temp\\pip-install-_wc8sxch\\Shapely\\setup.py'"'"'; __file__='"'"'C:\\Users\\Staj\\AppData\\Local\\Temp\\pip-install-_wc8sxch\\Shapely\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
         cwd: C:\Users\Staj\AppData\Local\Temp\pip-install-_wc8sxch\Shapely\
    Complete output (9 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\Staj\AppData\Local\Temp\pip-install-_wc8sxch\Shapely\setup.py", line 80, in <module>
        from shapely._buildcfg import geos_version_string, geos_version, \
      File "C:\Users\Staj\AppData\Local\Temp\pip-install-_wc8sxch\Shapely\shapely\_buildcfg.py", line 200, in <module>
        lgeos = CDLL("geos_c.dll")
      File "e:\python\lib\ctypes\__init__.py", line 364, in __init__
        self._handle = _dlopen(self._name, mode)
    OSError: [WinError 126] The specified module could not be found
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

2 个答案:

答案 0 :(得分:1)

该错误可能是由于缺少生成dll所需的C编译器所致。 解决方法:

  1. https://www.lfd.uci.edu/~gohlke/pythonlibs/#shapely

  2. 安装二进制文件
  3. pip安装Shapely-1.6.4.post2-cp37-cp37m-win_amd64.whl(在Anaconda环境中,您可以使用conda安装)

答案 1 :(得分:0)

错误说明了一切。 The specified module could not be found表示您没有安装某些必需的软件包。我猜您想念Shapely which is a requirement。下次按照文档中的安装步骤进行操作。或使用conda,它更简单。