LoginSignup
1
1

More than 3 years have passed since last update.

Shapely インストル時にerrorが発生した件

Posted at
Window 10にpythonのshapely ライブラリーをpip install時に下記のようなエラーが表示された:
Collecting shapely
  Downloading https://files.pythonhosted.org/packages/a2/fb/7a7af9ef7a35d16fa23b127abee272cfc483ca89029b73e92e93cdf36e6b/Shapely-1.6.4.post2.tar.gz (225kB)
    100% |████████████████████████████████| 235kB 6.2MB/s
    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-install-gcveixsc\shapely\setup.py", line 80, in <module>
        from shapely._buildcfg import geos_version_string, geos_version, \
      File "C:\Users\AppData\Local\Temp\pip-install-gcveixsc\shapely\shapely\_buildcfg.py", line 200, in <module>
        lgeos = CDLL("geos_c.dll")
      File "C:\Users\AppData\Local\Continuum\anaconda3\lib\ctypes\__init__.py", line 356, in __init__
        self._handle = _dlopen(self._name, mode)
    OSError: [WinError 126] 指定されたモジュールが見つかりません。
<font color='red'>Command "python setup.py egg_info" failed with error code 1 in C:\Users\AppData\Local\Temp\pip-install-gcveixsc\shapely\</font>

以下の方法を試しましたが失敗、、、
- pip upgrade
- tar.gzをダウンロードしてインストール

Pypiのshapely project descriptionにこの記載を見つけった:

Windows users have two good installation options: the wheels at http://www.lfd.uci.edu/~gohlke/pythonlibs/#shapely and the Anaconda platform’s conda-forge channel.

それから、システム(32-bit or 64-bit)とPythonのバージョンを確認した上、
https://www.lfd.uci.edu/~gohlke/pythonlibs/#shapely
から.whlファイルをダウンロードしてもう一回試しました。

pip install C:\Users\Downloads\Shapely-1.6.4.post2-cp37-cp37m-win_amd64.whl .

今回は無事にインストールできました〜

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1