![](/img/trans.png)
[英]OSError: [WinError 126] The specified module could not be found?
[英]Install Shapely: OSError: [WinError 126] The specified module could not be found
我必須安裝 Shapely 包( http://toblerity.org/shapely/project.html#installation )。 但是當我使用:
pip install Shapely
我收到此錯誤:
Collecting Shapely
Using cached Shapely-1.5.17.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\AppData\Local\Temp\pip-build-mwuxcain\Shapely\setup.py", line 38, in <module>
from shapely._buildcfg import geos_version_string, geos_version, \
File "C:\Users\AppData\Local\Temp\pip-build-mwuxcain\Shapely\shapely\_buildcfg.py", line 200, in <module>
lgeos = CDLL("geos.dll")
File "C:\Users\Anaconda3\lib\ctypes\__init__.py", line 344, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\AppData\Local\Temp\pip-build-mwuxcain\Shapely\
而且,當我使用:
conda install shapely
我收到此錯誤:
Fetching package metadata ...........
PackageNotFoundError: Package not found: Conda could not find '
我在 Windows 10(64 位)上使用 Python 3.6.0 (Anaconda3)。
請幫忙。 (沒有任何效果)
使用http://www.lfd.uci.edu/~gohlke/pythonlibs/#shapely下載 WHL 文件
安裝:
python -m pip install Shapely-1.5.17-cp36-cp36m-win_amd64.whl
Ubuntu:
pip install shapely==1.6b2
你也可以使用
conda install -c conda-forge shapely
它對我有用。
對我有用的解決方案(Windows Server):
從https://trac.osgeo.org/osgeo4w/安裝 osgeo4w
將 geos_c.dll 和 geos.dll 復制到 C:\\ProgramData\\Anaconda3\\Library\\bin
pip install shapely
不起作用,但conda install shapely
對我來說很好用(windows 用戶)
https://www.programmersought.com/article/70235795361/
copy "[env path]\LIb\site-packages\shapely\DLLs\geos*.dll" to "[env path]\Library\bin"
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.