Installing rasterio on Windows is a challenge, specially when developers dont show Windows love – Windoze for them :), anyway the fact is a lot of us are using Windows, if you go to rasterio Windows installation it currently looks like this

rasterio-windows-installation

 

Windows

Windows binary packages created by Christoph Gohlke are available here.

Doesn’t say much, but when you click on the link it takes you to a page where Christoph Gohlke has provided with whl files (if I recall they used to be exe files before). Now what to do!

Disclaimer: I followed this steps and I manage to get it to work on my python install and added a few notes, feel free to try it out and check if it works for you but can’t guarantee it works 100% as I have just installed it

1. I installed Visual Studio 2015 RC Downloads (don’t know if it was actually needed as I installed whl after installing it so it may not be necessary)

visual-studio

2.Using Windows binary packages created by Christoph Gohlke (http://www.lfd.uci.edu/~gohlke/pythonlibs/) download gdal and rasterio for your installed version, I am showing the ones for mine

 

rasterio-whlgdal-whl

3. open a cmd terminal cd into directoy where the whl files were downloaded

e.g. C:\Users\UserName\Downloads

cd-cmd

4.pip install wheel (if it isn’t installed previously)

pip-install-wheel

5. pip install pip install rasterio-0.23.0-cp27-none-win_amd64.whl GDAL-1.11.2-cp27-none-win_amd64.whl (only way it worked is installing both at same time separating whl by a space)

pip-install-rasterio

Now showing all working

rasterio-version****** Final thing ******

note this setup works for installing rasterio and works when calling from python but gives a dependency issue when calling rio –version

File “C:\Python27\lib\site-packages\pkg_resources__init__.py”, line 832, in r
esolve raise VersionConflict(dist, req).with_context(dependent_req) pkg_resources.VersionConflict: (gdal 1.11.2 (c:\python27\lib\site-packages), Requirement.parse(‘GDAL==1.11’))

I still haven’t figured whats happening except the conflict itself

Categories: GISPython

2 Comments

Reese · September 12, 2019 at 3:59 pm

I tried the import rasterio command after following the steps and got this error:

Error 1: Can’t load requested DLL: C:\Program Files (x86)\GDAL\gdalplugins\ then all of the plug ins for GDAL even though they’re in the directory.

It’s really a pain to install rasterio on windows. Any idea how to fix that one?

    antoniolocandro · September 23, 2019 at 5:17 am

    Hi I haven’t used rasterio in a while so I can’t help you out sorry about it! Have you checked if they got github or something?

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *