0

My question is related to Why is Shapely not installing correctly?

However it is not working and I am struggling to find information/understand how to install it. I am running my own environment using venv.

I have downloaded the binary correct to my Windows architecture (64-bit) and python version (3.7.3) from https://www.lfd.uci.edu/~gohlke/pythonlibs/#shapely.
My pip version is updated to last version (pip-19.0.3).
I have placed the file in the root of my app where I am running my venv from.

In my cmd terminal I am trying

pip install Shapely-1.6.4.post2-cp37-cp37m-win_amd64.whl

But this just give me

ERROR: Shapely-1.6.4.post2-cp37-cp37m-win_amd64.whl is not a supported wheel on this platform.

What am I doing wrong?

geogrow
  • 1,683
  • 2
  • 21
  • 41
  • 1
    try installing the gdal wheel 1st from the download page you posted – ziggy Sep 10 '19 at 13:45
  • 1
    how many pythons do you have ? – Hicham Zouarhi Sep 10 '19 at 13:46
  • I am running my terminal using my python instance of my venv so that should be fine? Unfortunately gdal failed as well.. Was trying python -m pip install GDAL-2.4.1-cp37-cp37m-win_amd64.whl but failed with the saem error as with shapely. Will do more research on that though – geogrow Sep 10 '19 at 13:55
  • @geogrow try installing shapely using pip3, and check your PYTHONPATH and PYTHONHOME variables, they should be refering to where you python 3.7 is – Hicham Zouarhi Sep 10 '19 at 14:11
  • Thanks I will give that a go! – geogrow Sep 10 '19 at 14:12
  • Navigate to python folder (which includes python.exe) in cmd and try to run python -m pip install shapely. – Kadir Şahbaz Jan 31 '20 at 06:10

1 Answers1

1

From a Windows command prompt with Python, you can now install Shapely like this:

pip install shapely

this will download and install the binary wheels from PyPi for Windows, macOS or Linux.

Mike T
  • 42,095
  • 10
  • 126
  • 187
  • Do you know if they recently uploaded to PyPI? I'm pretty sure that Shapely versions < 1.7 were not on there and therefore supposed to be installed the way OP is trying to. At the time of asking a pip install might not have been possible. Glad it's been added though. – Tim Skov Jacobsen Mar 06 '20 at 21:39
  • 1
    @TimSkovJacobsen correct this was not possible at the time of the question. Pip for Windows started with Shapely 1.7.0+ and Python 3.5. – Mike T Mar 07 '20 at 23:52