Re: [gdal-dev] GDAL scripting with Python 2.5 (on windows)

Ivan ivan.lucena at pmldnet.com
Wed Oct 21 13:46:43 EDT 2009


Aleksey,

>  Thank you, this works. I must have overlooked the gdal-python bindings
>  package in the Advanced settings on my last try.

Welcome.

>  One thing I am currently missing in OSGeo4W GDAL is support for ECW and
>  MrSID -- is it available? I've installed the gdal-ecw and gdal-mrsid
>  packages, but it seems I am missing the DLLs. E.g. when I try "gdalinfo
>  --formats" I get complaints:
>  ERROR 1: Can't load requested DLL:
>  C:\OSGeo4W\apps\gdal-16\bin\gdalplugins\gdal_ECW_JP2ECW.dll
>  126: The specified module could not be found.
>  
>  ERROR 1: Can't load requested DLL:
>  C:\OSGeo4W\apps\gdal-16\bin\gdalplugins\gdal_MrSID.dll
>  126: The specified module could not be found.
>  
>  Have tried this with both gdal-* and gdal16-* packages. And remembered to
>  run gdal16.bat to activate the GDAL 1.6 environment. However, can't get
>  ECW and MrSID support.
>  
>  I suspect this is due to licensing issues. Do I need to install support
>  for these formats separately?

Yes, you need to get the SDKs from Erdas and Lizartech.

See the GDAL supported format list for information: 

http://www.gdal.org/formats_list.html

Best regards,

Ivan


>  
>  Thank you,
>  
>  Aleksey
>  
>  
>  On Mon, Oct 19, 2009 at 10:49 PM, Ivan <[LINK:
>  mailto:ivan.lucena at pmldnet.com] ivan.lucena at pmldnet.com> wrote:
>  Aleksey
>  
>  Installing GDAL + Python 2.5 + "GDAL Python bindings" through the
>  advanced settings usually works pretty easy.
>  
>  And the you should be able to launch the OSGeo4W Shell and access it,
>  example:
>  
>   C:\OSGeo4W> Python
>   >>> from osgeo import gdal
>   >>> gdal.VersionInfo()
>   '1520'
>   >>>
>  
>  Notice that OSGeo4W install its own Python 2.5 distribution. So if you
>  have a previous installation of Python 2.5, that is not going to access the
>  GDAL bindings.
>  
>  Regards,
>  
>  Ivan
>  
>  
>  Aleksey Naumov wrote:
>  
>  
>  Dear GDAL users,
>  
>  My apologies if this is a repeated question, I searched the mail acrhives
>  and found a few discussions on this subject, but no resolution, AFAIK. I
>  may have overlooked a good thread, would appreciate a link.
>  
>  My problem is being able to do scripting with GDAL using Python 2.5 (this
>  version is important because of integration/compatibility with a number of
>  other packages, mainly IPython), and I need to be able to do it on Windows.
>  I attempted a few approaches, but could not figure out how to get all the
>  pieces to work together:
>    - FWTools 2.4.5; however it comes with Python 2.3, an older version
>    - OSGEO4W
>       - Went through the Express setup and chose GDAL (+ GRASS,
>  QGIS).It installed Python 2.5.2; however on "import gdal" I get error "No
>  module named gdal".
>       - I looked through the Advanced setup and tried it a few times
>  with various options related to GDAL, however was not able to get it to
>  work. Are there specific options that should be enabled to make GDAL/Python
>  scripting possible in OSGEO4W?
>    - Tried to "easy_install gdal", this finds GDAL 1.6.1 and puts a
>  suitable *.egg into C:\Python25\Lib\site-packages. But when I try to
>  "import gdal" I get the error stating that gdal16.dll was not found.
>  
>  Is there a way to achieve this on Windows? Do I need to compile GDAL on
>  my windows box; if so, should I be using Cygwin or try to download MS VC++?
>  
>  Thank you
>  
>  Aleksey
>  
>  
>  ------------------------------------------------------------------------
>  
>  _______________________________________________
>  gdal-dev mailing list
>  [LINK: mailto:gdal-dev at lists.osgeo.org] gdal-dev at lists.osgeo.org
>  [LINK: http://lists.osgeo.org/mailman/listinfo/gdal-dev]
>  http://lists.osgeo.org/mailman/listinfo/gdal-dev


More information about the gdal-dev mailing list