title: Translate .ecw to .tif with GDAL from OSGeo in Python
body: <p>I have about 250 .ecw files I want to transform to .tif or .png or .jpg using GDAL and Python. This is my code:</p>
  
  <pre><code>from osgeo import gdal
  inputfile = gdal.Open('C:/Users/Berteld/aGIS/python/data/wms/orthophotos_2019/dop20rgb_400_5826_2_be_2019.ecw')
  outputfile = 'C:/Users/Berteld/aGIS/python/data/wms/orthophotos_2019/dop20rgb_400_5826_2_be_2019.jpg'
  
  gdal.Translate(inputfile, outputfile)
  </code></pre>
  
  <p>This results in</p>
  
  <pre><code>ERROR 4: `C:/Users/Berteld/aGIS/python/data/wms/orthophotos_2019/dop20rgb_400_5826_2_be_2019.ecw' not recognized as a supported file format.
  </code></pre>
  
  <p>When using the OSGeo4W Shell it works like a charm, but I don't want to do this by hand for all of the files. These are my environment variables:</p>
  
  <pre><code>GDAL_DATA = C:\OSGeo4W64\share\gdal 
  GDAL_DRIVER_PATH = C:\OSGeo4W\bin\gdalplugins
  </code></pre>
  
  <p>What's my mistake?</p>