6

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

Cameron Wasilewsky
  • 962
  • 2
  • 10
  • 12

3 Answers3

8

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.

thewaywewere
  • 8,128
  • 11
  • 41
  • 46
  • @Cameron Can you give me a vote up if my answer helps to solve the question? – thewaywewere Jun 21 '17 at 12:57
  • hello, I tried all of the above ways - including installing the wheel file manually. But I keep getting (always the same) error `Command "python setup.py egg_info" failed with error code 1 in C:\Users\[....]` Do you have an idea what this could be about? – Ivo Aug 27 '18 at 13:22
  • @Ivo You may check [this](https://stackoverflow.com/questions/49985465/python-setup-py-egg-info-failed-with-error-code-1) or open a new question for the problem you encountered. – thewaywewere Aug 27 '18 at 18:08
  • I've tried this already but unfortunately without success... Thank you though! – Ivo Aug 27 '18 at 18:47
  • After much searching (for windows 10) this worked. Can't thank you enough. – Wassadamo Sep 30 '18 at 23:43
  • This helped me as well. I had to download the .wh file, and I could install it. Thanks a bunch! – Vada Poché Dec 04 '18 at 05:40
  • The [docs](https://shapely.readthedocs.io/en/stable/project.html#installing-shapely-1-6) also suggest a second option for installing Shapely on Windows, namely with conda by using the conda-forge channel. – ketza Apr 27 '19 at 13:52
1

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
Guillaume Chevalier
  • 9,613
  • 8
  • 51
  • 79
0

As of 2020, you can now simply install Shapely for Windows with:

pip install shapely

(you many need --upgrade to get at least version 1.7.0, when binary wheels were added for Windows)

Mike T
  • 41,085
  • 18
  • 152
  • 203