3

I am trying to install rasterio into my python environment and am getting the following errors. I can do

    conda install rasterio

No error comes up on the install but I come up with the following error when I try to import

    from rasterio._base import eval_window, window_shape, window_index

    ImportError: DLL load failed: The specified module could not be found. 

if I try

    pip install rasterio

it errors when installing with this:

    rasterio/_base.c(263) : fatal error C1083: Cannot open include file:'cpl_conv.h': No such file or directory
    error: command 'C:\\Users\\Rdebbout\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit status 2

    ----------------------------------------
    Failed building wheel for rasterio

I have the same problems with trying to import the fiona module. How and/or where do DLLs get loaded? I'm in the dark on this one and would appreciate any help or direction as to how to troubleshoot this problem.

I am using the 64-bit version of spyder on windows 7.

Mike T
  • 41,085
  • 18
  • 152
  • 203
rick debbout
  • 439
  • 2
  • 5
  • 19
  • It looks like the setup script can't find a header file that it needs. [This answer](http://gis.stackexchange.com/questions/28966/python-gdal-package-missing-header-file-when-installing-via-pip) from the GIS Stack Exchange may solve your problem. – Nat Knight Oct 15 '15 at 20:42
  • when you say 'setup script' are you referring to a script titled 'setup.py' in the site-packages folder? There is no such script in that folder – rick debbout Oct 15 '15 at 21:18
  • That's what I meant, so obviously *that's* not it, but I expect `pip` is doing something similar behind the scenes. – Nat Knight Oct 16 '15 at 00:10

3 Answers3

1

I would suggest trying the ioos anaconda recipe (https://anaconda.org/ioos/rasterio).

conda install -c https://conda.anaconda.org/ioos rasterio.

I have run into the same DLL issue you are seeing when trying to install more recent versions of rasterio using the standard anaconda version.

jdmcbr
  • 5,964
  • 6
  • 28
  • 38
0

I had the same issue. A reinstall solved it.

conda install -f rasterio
user2856
  • 1,145
  • 1
  • 10
  • 24
-1

If you're still having the issue. you can create a new conda enviroment using:

conda create -n envname

After that install using: conda install -c conda-forge/label/dev rasterio

Dzakirin
  • 173
  • 17