1

I am using windows 10 operating system on my HP i7 machine with Python 2.7 installed. For windows, it is possible to install pyModis using pip by writing the following syntax in Windows PowerShell:

pip install pyModis

But it give me error like:

  Failed building wheel for GDAL Failed to build GDAL Installing collected packages: GDAL   Running setup.py install for GDAL
Complete output from command c:\python2.7\python.exe -c "import setuptools, tokenize;__file__='c:\\users\\oaamer\\ap

pdata\local\temp\pip-build-j1djwe\GDAL\setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().repl ace('\r\n', '\n'), file, 'exec'))" install --record c:\users\oaamer\appdata\local\temp\pip-njzqtm-record\install-rec ord.txt --single-version-externally-managed --compile: running install running build running build_py running build_ext building 'osgeo._gdal' extension C:\Users\oaamer\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD / W3 /GS- /DNDEBUG -I../../port -I../../gcore -I../../alg -I../../ogr/ -Ic:\python2.7\include -Ic:\python2.7\PC -Ic:\pytho n2.7\lib\site-packages\numpy-1.9.2-py2.7-win32.egg\numpy\core\include /Tpextensions/gdal_wrap.cpp /Fobuild\temp.win32-2. 7\Release\extensions/gdal_wrap.obj gdal_wrap.cpp C:\Users\oaamer\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Include\xlocale(342) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc extensions/gdal_wrap.cpp(2859) : fatal error C1083: Cannot open include file: 'cpl_port.h': No such file or director y error: command 'C:\Users\oaamer\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\ \cl.exe' failed with exit status 2

how to fix that error i have tried so many times to fix read different blogs but did not find the possible solution as windows does not provide friendly environment.

5
  • The problem here is GDAL and not pyModis. On Windows, you cannot install GDAL with pip (no native compiler). Try to install GDAL first then pyModis – gene Nov 14 '15 at 17:01
  • @gene thanks. would you please guide me how to install GDAL on windows 10. What if i have installed QGIS which has already built in GDAL installation then. – Waseem Ali Nov 15 '15 at 10:03
  • What Python version you are using, the one from QGIS or another ? – gene Nov 15 '15 at 10:25
  • @gene I have just recently installed the Python 3.5. Old version was Python 2.7. Python 3.5 is newly installed separately on windows 10. I have also installed QGIS 2.6. – Waseem Ali Nov 15 '15 at 10:30
  • You cannot use the GDAL version of QGIS (for Python 2.7.x) with Python 3.5 . Try to install it (for Python 3.5) from the Unofficial Windows Binaries for Python Extension Packages – gene Nov 15 '15 at 10:40

Browse other questions tagged or ask your own question.