0. Problem description

When installing the Python Shapely package on Windows, the following error is reported:

C:\Users\xiaos>pip install shapely
Looking inindexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting shapely Downloading https://pypi.tuna.tsinghua.edu.cn/packages/a2/fb/7a7af9ef7a35d16fa23b127abee272cfc483ca89029b73e92e93cdf36e6b/Shapely-1. 6.4. Post2. Tar. Gz (225 KB) | █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ | 235 KB 1.7 MB/s ERROR: Complete the output fromcommand python setup.py egg_info:
    ERROR: Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\xiaos\AppData\Local\Temp\pip-install-73psdp3n\shapely\setup.py", line 80, in <module>
        from shapely._buildcfg import geos_version_string, geos_version, \
      File "C:\Users\xiaos\AppData\Local\Temp\pip-install-73psdp3n\shapely\shapely\_buildcfg.py", line 200, in <module>
        lgeos = CDLL("geos_c.dll")
      File "C:\Datas\Apps\RJ\Miniconda3\lib\ctypes\__init__.py", line 356, in__init__ self._handle = _dlopen(self._name, mode) OSError: [WinError 126] The specified module could not be found. ---------------------------------------- ERROR: Command"python setup.py egg_info" failed with error code 1 in C:\Users\xiaos\AppData\Local\Temp\pip-install-73psdp3n\shapely\
Copy the code

1. Solutions

If conda is not available, you are advised to install Miniconda from here, select the corresponding system, and select the latest version.

conda install shapely -y 

C:\Users\xiaos>conda install shapely -y
Collecting package metadata (current_repodata.json): done
Solving environment: done

...

...
Downloading and Extracting Packages
mkl-service-2.0.2    | 56 KB     | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # | 100%Shapely - 1.6.4 281 KB | |# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # | 100%Certifi - 2019.6.16 156 KB | |# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # | 100%Conda - 4.7.11 3.0 MB | |# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # | 100%Mkl_random - 1.0.2 272 KB | |# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # | 100%48 KB numpy - 1.16.4 | |# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # | 100%Numpy - base - 1.16.4 3.3 MB | |# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # | 100%Mkl_fft - 1.0.14 137 KB | |# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
Copy the code

I Hope you can help me.