ERROR: Command "python setup.py egg_info" failed with error code 1

pip安装imgaug的时候出现这种情况:

C:\Windows\System32>python -m pip install imgaug
Collecting imgaug
  Using cached https://files.pythonhosted.org/packages/17/a9/36de8c0e1ffb2d86f871cac60e5caa910cbbdb5f4741df5ef856c47f4445/imgaug-0.2.9-py2.py3-none-any.whl
Collecting scipy (from imgaug)
  Using cached https://files.pythonhosted.org/packages/58/f0/d00c0e01e077da883f030af3ff5ce653a0e9e4786f83faa89a6e18c98612/scipy-1.2.1-cp37-cp37m-win_amd64.whl
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: numpy>=1.15.0 in c:\users\cai\pycharmprojects\untitled2\venv\lib\site-packages (from imgaug) (1.16.3)
Collecting imageio (from imgaug)
  Using cached https://files.pythonhosted.org/packages/af/0a/943c965d372dae0b1f1482677d29030ab834351a61a9a632fd62f27f1523/imageio-2.5.0-py3-none-any.whl
Collecting Shapely (from imgaug)
  Using cached https://files.pythonhosted.org/packages/a2/fb/7a7af9ef7a35d16fa23b127abee272cfc483ca89029b73e92e93cdf36e6b/Shapely-1.6.4.post2.tar.gz
    ERROR: Complete output from command python setup.py egg_info:
    ERROR: Traceback (most recent call last):
      File "", line 1, in <module>
      File "C:\Users\cai\AppData\Local\Temp\pip-install-cqw4fxn8\Shapely\setup.py", line 80, in <module>
        from shapely._buildcfg import geos_version_string, geos_version, \
      File "C:\Users\cai\AppData\Local\Temp\pip-install-cqw4fxn8\Shapely\shapely\_buildcfg.py", line 200, in <module>
        lgeos = CDLL("geos_c.dll")
      File "C:\Users\cai\AppData\Local\Programs\Python\Python37\lib\ctypes\__init__.py", line 356, in __init__
        self._handle = _dlopen(self._name, mode)
    OSError: [WinError 126] 找不到指定的模块。
    ----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in C:\Users\cai\AppData\Local\Temp\pip-install-cqw4fxn8\Shapely\

查看网上资料,大多数都说升级两个包就可以了,一个是pip,一个是setuptools,升级方式如下:

python -m pip install --upgrade setuptools
python -m pip install --upgrade pip

结果还是一样,经过分析,每次停止都是再Shapely包这块停止的,因此我们需要从下面这个网站下载对应的Shapely包(这个网站很重要,会经常用到),外展包网站,找到
ERROR: Command
注意这里有版本与对应的操作位数的区别,下载对应的就可以了。
然后进入cd进入下载路径(这里我下载再D:\download2),然后安装Shapely外展包

C:\Windows\System32>cd D:\download2

C:\Windows\System32>d:

D:\download2>python -m pip install Shapely-1.6.4.post1-cp37-cp37m-win_amd64.whl

显示成功,再安装imgaug,也会成功。

python -m pip install imgaug

你可能感兴趣的:(报错记录)