何时安装图像测量.py我明白了

2024-10-01 02:39:05 发布

您现在位置:Python中文网/ 问答频道 /正文

这是一张关于我的问题的图片。我完全卡住了。 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.

Tags: installpipinfrompyhttpspackageslocal
2条回答

错误更能说明一切。The specified module could not be found表示您没有安装一些必需的软件包。我猜你错过了Shapelywhich is a requirement。下次请遵循文档中的安装步骤。或者使用conda,它更简单。在

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

  1. https://www.lfd.uci.edu/~gohlke/pythonlibs/#shapely安装二进制文件

  2. pip安装Shapely-1.6.4.post2-cp37-cp37m-win_amd64.whl(在Python环境中。您可以使用conda安装)

相关问题 更多 >