python包rasterio编译_python - Import module (rasterio) fail with conda or pip install

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.

python

rasterio

|

this question

edited Mar 28 '16 at 9:38

Mike T 16k 7 55 88 asked Oct 15 '15 at 20:08

rick debbout 35 10      It looks like the setup script can't find a header file that it needs.

This answer from the GIS Stack Exchange may solve your problem. –

Nathaniel 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. –

Nathaniel Knight Oct 16 '15 at 0:10

|

2 Answers

2

---Accepted---Accepted---Accepted---

I would suggest trying the ioos anaconda recipe (https://anaconda.org/ioos/rasterio).keep getting an error when importing it from IPython: In [4]: import frida---------------------------------------------------------------------------ImportError Traceback (most recent call last)

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.

|

this answer answered Mar 30 '16 at 4:59

jdmcbr 943 1 8 18

|

I had the same issue. A reinstall solved it.

conda install -f rasterio

|

this answer answered Jul 11 '16 at 4:19

Luke 544 1 5 15

|

erent from conda install basemap Both gave me different results, why is that pip install basemap Collecting basemap Could not find a version that satisfies the requirement basemap (from versions: ) Some externally hosted files were ig

你可能感兴趣的:(python包rasterio编译_python - Import module (rasterio) fail with conda or pip install)