Shapely not installing correctly

Updated answer for Python 3

You should not nowadays encounter any issue while installing on Windows using (as long as pip is version 8 or more according to official Shapely doc and you are using Python 3):

pip install shapely

To check pip version, do :

python -c "import pip;print(pip.__version__)"

If you need to upgrade pip, just do :

pip install -U pip

Outdated if Python 3 otherwise, always relevant for Python 2.x

You're doing your installation wrong.

Instead of

pip install shapely

go to https://www.lfd.uci.edu/~gohlke/pythonlibs/#shapely to download Windows wheels

Click on the file Shapely‑1.6.4.post2‑cp27‑cp27m‑win_amd64.whl

Shapely‑1.6.4 is the version of Shapely, cp27‑cp27m means the wheel is for Python 2.7, win_amd64 means it's for Windows with 64 bits architecture (you may choose another wheel depending on your Python version and Windows architecture)

Launch the install with the following and it will be OK after.

pip install Shapely‑1.6.4.post2‑cp27‑cp27m‑win_amd64.whl

Just as an information, "pip install shapely" works when you have the C compiler installed to build Geos dll and it's not the way it works on Windows.


Try using Conda-Forge:

conda config --add channels conda-forge 
conda install shapely

As of 2020, the recommended method to install Shapely is simply:

pip install shapely

(this will not work for Windows + Python 2.7, as these binary wheels are not available)


However, if you are using Python from Anaconda (or Miniconda), you should stick to their version with:

conda install shapely