Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issue installing shapely Python Package

I am running python 3.6 on windows and am attempting to install Shapely using

pip install shapely==1.6b2

It is giving me the following errors

Command "python setup.py egg_info" failed with error code 1 in C:\Users\Cameron\AppData\Local\Temp\pip-build-242ae_ih\shapely\

I have seen the other posts about this issue and have tried:

pip install --upgrade setuptools
pip install ez_setup
easy_install -U setuptools

Nothing seems to work and I am not sure what to do next. Any advice would be appreciated.

Thanks

like image 929
Cameron Wasilewsky Avatar asked Apr 03 '17 11:04

Cameron Wasilewsky


People also ask

How do I import shapely into Anaconda?

Install With Pip Once you've downloaded the correct Shapely package, open up the 'Anaconda Command Prompt' and navigate to the folder containing the downloaded wheel.

Is shapely in Anaconda?

Shapely is available via system package management tools like apt, yum, and Homebrew, and is also provided by popular Python distributions like Canopy and Anaconda. If you use the Conda package manager to install Shapely, be sure to use the conda-forge channel.

How do I install GEOS in Python?

Download and install a GEOS binary (https://trac.osgeo.org/osgeo4w/) Set GEOS_INCLUDE_PATH and GEOS_LIBRARY_PATH environment variables (see below for notes on GEOS discovery) Run pip install pygeos --no-binary. Make sure the GEOS .


2 Answers

You may try to use the binary from this unofficial site. Just use pip install {wheel file name} to install it.

  • Shapely‑1.5.17‑cp36‑cp36m‑win32.whl (32-bit)
  • Shapely‑1.5.17‑cp36‑cp36m‑win_amd64.whl (64-bit)

Hope this would make the installation easier.

like image 60
thewaywewere Avatar answered Oct 28 '22 21:10

thewaywewere


I had a similar error for installing shapely-1.5.17 via pip install shapely, and installing this made the pip install command work thereafter:

sudo apt-get install libgeos-dev
like image 31
Guillaume Chevalier Avatar answered Oct 28 '22 19:10

Guillaume Chevalier