[gdal-dev] ImportError when importing gdal module with python 2.7 on Windows 7 64-bit

Casper Børgesen (CABO) CABO at NIRAS.DK
Thu Nov 15 10:16:32 PST 2012


I usually struggle with the same problems over and over again. Try using Dependency Walker (http://www.dependencywalker.com/) to see if you are missing a library or two. I used it to determine that I was missing these two files: 

    msvcp100.dll
    msvcr100.dll

I remember something about Microsoft removing these during some updates. They might be needed in your path.

I don't know if that helps :)

Regards, Casper

-----Original Message-----
From: gdal-dev-bounces at lists.osgeo.org [mailto:gdal-dev-bounces at lists.osgeo.org] On Behalf Of nnneogeorge
Sent: 15. november 2012 18:59
To: gdal-dev at lists.osgeo.org
Subject: Re: [gdal-dev] ImportError when importing gdal module with python 2.7 on Windows 7 64-bit

Hey guys, 

I am using the python 2.7.3 64b, with the GDAL 64b (tried both 19 & 20
versions) under windows 7 64b, I have followed all the steps here

http://www.gis.usu.edu/~chrisg/python/2009/docs/gdal_win.pdf

and here

http://pythongisandstuff.wordpress.com/2011/07/07/installing-gdal-and-ogr-for-python-on-windows/

took the software from here 

http://www.lfd.uci.edu/~gohlke/pythonlibs/
http://www.gisinternals.com/sdk/PackageList.aspx?file=release-1400-x64-gdal-mapserver.zip 

And experimented with all the possible folder paths, added in the Environmental Variable... the modules osGEo and gdal are both in the list of python (I can check through > help ("modules") , but when I ask for more information on these, it throws the following error 

######
problem in osgeo - <type 'exceptions.ImportError'>: DLL load failed: The specified module could not be found.
######



ofcourse the same goes when I try to import gdal ,I m getting the following
message: 

####
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import gdal
File "C:\Python27\lib\gdal.py", line 2, in <module> from osgeo.gdal import deprecation_warn File "C:\Python27\lib\osgeo\__init__.py", line 21, in <module> _gdal = swig_import_helper() File "C:\Python27\lib\osgeo\__init__.py", line 17, in swig_import_helper _mod = imp.load_module('_gdal', fp, pathname, description)
ImportError: DLL load failed: The specified module could not be found.
####

Which I guess should understand that the dll that supposed to be created, well hasnt... 

Checked manually and yeap its true, couldnt find it - 

Then I tried to check if the path was right for sure, so opening the windows console and typing "set" gave me the list with the path variables --> all right. 

Also the osgeo command-line works perfectly fine. 

Any ideas or things to try more than welcome... 

Thanks a lot, 

George. 




--
View this message in context: http://osgeo-org.1560.n6.nabble.com/gdal-dev-ImportError-when-importing-gdal-module-with-python-2-7-on-Windows-7-64-bit-tp5006198p5016723.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
_______________________________________________
gdal-dev mailing list
gdal-dev at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


More information about the gdal-dev mailing list