In this post, I’ll share how to install geopandas and some other gis related packages on Windows. If you are on Mac or Linux you can probably just pip install
those without any issue.
I usually had to do a google search every time I wanted to install these packages on Windows environment. Of course, you can always use conda to make things simpler. Anyway, let’s get to the point.
As always start with a new virtual environment in your project directory.
virtualenv venv
.\venv\Scripts\activate
You can try pip install geopandas
but you’ll probably get errors about some packages.
Here, we can find the dependencies of geopandas. Among them, Fiona is the one that causes problems and Fiona is dependent on GDAL which is another issue. We are going to install these manually.
Find the wheels you need from this site: gohlke.
You should download the ones that’s matching with your python distribution. For example if you are using Python 3.7.9 on a x64 system, download ...cp37‑cp37m‑win_amd64.whl
.
Then install these wheels:
pip install GDAL‑3.4.1‑cp37‑cp37m‑win_amd64.whl
pip install Fiona-1.8.21-cp37-cp37m-win_amd64.whl
You probably, only need to install GDAL and Fiona.
Other dependencies should be automatically installed when you try to pip install geopandas
.
If you get any error you can always install the relevant wheel.
That’s it.