AvidDabbler Blog

Setting up GeoPanadas on Windows

October 14, 2019

The Problem

I am starting a new project where I am trying to see if I can recreate some of the work that I do in my work, but using Open Source and I was interested in working with GeoPandas. I have worked with Pandas in the past and had come across a couple of docs talking about GeoPandas.

So as with all Python libraries I ended up having a tough time trying to install and setup my environment. I tried working with PIP and Conda, but the issues persisted.

I ended up finding some documentation that speaks to this issue and the solution ended up being that I needed to install the decencies in the right order. However, those dependencies too were having issues installing. So what I ended up having to do is download the wheels manually and install them that way.

Issue Setting Up my Python Environment

When starting this project I thought that it would be pretty straight forward. I would just have to use a package manager to install all the dependencies and GeoPandas. I was wrong… it was frustrating. If you are in the same boat, don’t feel bad don’t be discouraged. We have all been there and part of earning your stripes is slogging through the endless documentation that beautiful individuals (like myself) have put together for you.

When you are setting up the environment you need to make sure that you are installing all of the dependencies in the order in which they were meant to be installed. Each library builds on top of one another. The dependencies are as follows:

  1. gdal
  2. fiona
  3. pyproj
  4. rtree
  5. shapely
  6. geopandas

The links in the list above should take you to where you need to go to download the python wheel files for each. Once you have downloaded them. Move them to a folder where you can access them easily. Then navigate via the command line to the folder to start the installs.

The above list is the order in which you need to install all of the dependencies. If any of these libraries are installed, go ahead and uninstall them now.

Once you have all of the files downloaded use pip to install install them by using pip install %file_location%.

PROTIP: If you are on windows you can type pip install and then drag the file from File Explorer over to Command Prompt and it will copy over the full file location over.

Next with GeoPandas

Whenever I get around to it. I am going to post a tutorial where I am going to try to recreate a TitleVI using GeoPandas.

LINKS!!!!

http://geopandas.org/io.html —> intro to geopandas

https://gdal.org/drivers/vector/filegdb.html —> gdal documentation

https://github.com/Toblerity/Fiona#windows —> setup fiona in windows

https://geoffboeing.com/2014/09/using-geopandas-windows/ —> Manual setup (What I had to use)


Written by Walter Jenkins who lives and works in Saint Louis. His passions are Civic Tech, Smart Cities and Alternative Transportation. He specializes in working with data analysis and visualization through maps.
You should follow him on Twitter.