已经安装更新了pip和setuptools,执行pip install -r requirements.txt 还是报这种错
ERROR: Command errored out with exit status 1:
command: 'd:\anaconda\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\AppData\\Local\\Temp\\pip-install-5ixu1o14\\shapely\\setup.py'"'"'; __file__='"'"'C:\\Users\\AppData\\Local\\Temp\\pip-install-5ixu1o14\\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 'C:\Users\AppData\Local\Temp\pip-pip-egg-info-g_fzo90r'
cwd: C:\Users\AppData\Local\Temp\pip-install-5ixu1o14\shapely\
Complete output (9 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\AppData\Local\Temp\pip-install-5ixu1o14\shapely\setup.py", line 80, in <module>
from shapely._buildcfg import geos_version_string, geos_version, \
File "C:\Users\AppData\Local\Temp\pip-install-5ixu1o14\shapely\shapely\_buildcfg.py", line 200, in <module>
lgeos = CDLL("geos_c.dll")
File "d:\anaconda\lib\ctypes\__init__.py", line 364, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] 找不到指定的模块。
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
后来参照其他解决方案安装了Shapely,包含了geos_c.dll文件
但是还是显示和之前相同的错误,不知道还有没有其他的解决办法
不知道可不可能是路径不对或者是环境的问题
问题已解决,需要把通过安装Shapely得到的geos_c.dll文件
复制粘贴到Python.exe所在路径的文件夹中才可以。
lgeos = CDLL("geos_c.dll")
你全盘搜索下,这个dll有么