Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
662 views
in Technique[技术] by (71.8m points)

python - Install Shapely: OSError: [WinError 126] The specified module could not be found

I have to install Shapely package (http://toblerity.org/shapely/project.html#installation). But when I am using:

pip install Shapely

I am getting this error:

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:UsersAppDataLocalTemppip-build-mwuxcainShapelysetup.py", line 38, in <module>
        from shapely._buildcfg import geos_version_string, geos_version, 
      File "C:UsersAppDataLocalTemppip-build-mwuxcainShapelyshapely\_buildcfg.py", line 200, in <module>
        lgeos = CDLL("geos.dll")
      File "C:UsersAnaconda3libctypes\__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:UsersAppDataLocalTemppip-build-mwuxcainShapely

And, when I am using:

conda install shapely

I am getting this error:

Fetching package metadata ...........


PackageNotFoundError: Package not found: Conda could not find '

I am using Python 3.6.0 (Anaconda3) on Windows 10 (64-bit).

Please help. (nothing works)

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Download WHL file using http://www.lfd.uci.edu/~gohlke/pythonlibs/#shapely

Install:

python -m pip install Shapely-1.5.17-cp36-cp36m-win_amd64.whl

Ubuntu:

pip install shapely==1.6b2

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...