<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ogr2ogr raises &amp;quot;DLL not found&amp;quot; error when run from Pro python environment in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/ogr2ogr-raises-quot-dll-not-found-quot-error-when/m-p/1206912#M44187</link>
    <description>&lt;P&gt;Interesting to know, but alas does not directly address the issue. As Dan said, Pro uses a different installation of GDAL, which apparently lacks the DLLs needed to run ogr2ogr command line. The link you provided is specific to the gdal python module (not command line ogr2ogr). As Dan and I's thread above describes, my hope is that perhaps there's a way to run ogr2ogr through the python gdal methods, but figuring that out seems time-consuming and will require some sifting through GDAL's API reference.&lt;/P&gt;</description>
    <pubDate>Fri, 26 Aug 2022 20:16:42 GMT</pubDate>
    <dc:creator>DarrenConly</dc:creator>
    <dc:date>2022-08-26T20:16:42Z</dc:date>
    <item>
      <title>ogr2ogr raises "DLL not found" error when run from Pro python environment</title>
      <link>https://community.esri.com/t5/data-management-questions/ogr2ogr-raises-quot-dll-not-found-quot-error-when/m-p/1206780#M44181</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;Here's what happens:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;I open the python command prompt in the default arcgispro-py3 environment, which has gdal installed.&lt;/LI&gt;&lt;LI&gt;I run &lt;FONT face="courier new,courier"&gt;ogr2ogr --help&lt;/FONT&gt; to test/confirm that I can use ogr2ogr.&lt;/LI&gt;&lt;LI&gt;I get, in succession, the 3 error messages below telling me that some dll files are missing:&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DarrenConly_1-1661526754586.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/49562iE0AEF4916A082D0B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DarrenConly_1-1661526754586.png" alt="DarrenConly_1-1661526754586.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DarrenConly_2-1661526788041.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/49563iD4D675205A119AB4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DarrenConly_2-1661526788041.png" alt="DarrenConly_2-1661526788041.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DarrenConly_4-1661526830314.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/49565i92A4BEF328CC5732/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DarrenConly_4-1661526830314.png" alt="DarrenConly_4-1661526830314.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Next, I confirmed which version of gdal ships with the Pro environment, and it is gdal 3.4.0:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DarrenConly_5-1661526923330.png" style="width: 544px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/49566iFEAAB1686953E910/image-dimensions/544x34?v=v2" width="544" height="34" role="button" title="DarrenConly_5-1661526923330.png" alt="DarrenConly_5-1661526923330.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then, as a test, I created a new, non-ESRI conda environment and installed gdal 3.4.0 in it by running &lt;FONT face="courier new,courier"&gt;conda install gdal=3.4.0, &lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;STRONG&gt;and that worked, &lt;/STRONG&gt;i.e., ogr2ogr works fine from a gdal installation in the non-ESRI environment, but I get the "dll not found" errors when running from the ESRI environment.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;I looked in environment folder that contains ogr2ogr.exe and, lo and behold, the 3 dll files are in the non-ESRI environment version of gdal, but not in the ESRI environment version.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Any reason why the ESRI environment doesn't load these DLLs with gdal? Would it mess things up if I simply copied the 3 DLLs over from the non-ESRI installation of gdal over to the ESRI installation?&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Also, I didn't always have this problem--I believe it has only come up since updating to Pro 3.0.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Thanks,&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2022 15:21:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/ogr2ogr-raises-quot-dll-not-found-quot-error-when/m-p/1206780#M44181</guid>
      <dc:creator>DarrenConly</dc:creator>
      <dc:date>2022-08-26T15:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: ogr2ogr raises "DLL not found" error when run from Pro python environment</title>
      <link>https://community.esri.com/t5/data-management-questions/ogr2ogr-raises-quot-dll-not-found-quot-error-when/m-p/1206791#M44182</link>
      <description>&lt;P&gt;Pro has their own distribution of the packages.&amp;nbsp; have a look&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import osgeo
dir(osgeo)
['__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', '__version__', '_gdal', 'config_file',
... SNIP ...
 'this_python_version_will_be_deprecated_in_gdal_version', 'ver_str', 'version_info', 'winreg']

from osgeo import gdal
dir(gdal)
['AbortPendingUploads', 'AllRegister', 'ApplyGeoTransform', 'ApplyVerticalShiftGrid', 'AsyncReader', 'Attribute',
... SNIP ...
'wrapper_GDALVectorTranslateDestDS', 'wrapper_GDALVectorTranslateDestName', 'wrapper_GDALWarpDestDS', 'wrapper_GDALWarpDestName']&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 26 Aug 2022 15:48:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/ogr2ogr-raises-quot-dll-not-found-quot-error-when/m-p/1206791#M44182</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-08-26T15:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: ogr2ogr raises "DLL not found" error when run from Pro python environment</title>
      <link>https://community.esri.com/t5/data-management-questions/ogr2ogr-raises-quot-dll-not-found-quot-error-when/m-p/1206792#M44183</link>
      <description>&lt;P&gt;There was a change at Pro 2.9:&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/2.9/get-started/whats-new-in-arcgis-pro.htm#ESRI_SECTION1_546A5C8048144FC595A58DAA6F9EBF47" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/2.9/get-started/whats-new-in-arcgis-pro.htm#ESRI_SECTION1_546A5C8048144FC595A58DAA6F9EBF47&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Does this help?&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2022 15:49:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/ogr2ogr-raises-quot-dll-not-found-quot-error-when/m-p/1206792#M44183</guid>
      <dc:creator>George_Thompson</dc:creator>
      <dc:date>2022-08-26T15:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: ogr2ogr raises "DLL not found" error when run from Pro python environment</title>
      <link>https://community.esri.com/t5/data-management-questions/ogr2ogr-raises-quot-dll-not-found-quot-error-when/m-p/1206794#M44184</link>
      <description>&lt;P&gt;I see, that might explain why the DLL files aren't in the Pro distribution. Is there some other way to run ogr2ogr commands from within a Pro environment? E.g, does osgeo.gdal have any methods equivalent to running ogr2ogr in the command line?&lt;/P&gt;&lt;P&gt;Ultimately, I want to convert OSM files to SHP files. Ogr2ogr is previously how I've done this.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2022 15:58:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/ogr2ogr-raises-quot-dll-not-found-quot-error-when/m-p/1206794#M44184</guid>
      <dc:creator>DarrenConly</dc:creator>
      <dc:date>2022-08-26T15:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: ogr2ogr raises "DLL not found" error when run from Pro python environment</title>
      <link>https://community.esri.com/t5/data-management-questions/ogr2ogr-raises-quot-dll-not-found-quot-error-when/m-p/1206795#M44185</link>
      <description>&lt;P&gt;have a look when you import it and do a dir... I snipped out a huge chunk of the methods, and I don't know which one you are using,&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2022 16:05:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/ogr2ogr-raises-quot-dll-not-found-quot-error-when/m-p/1206795#M44185</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-08-26T16:05:32Z</dc:date>
    </item>
    <item>
      <title>Re: ogr2ogr raises "DLL not found" error when run from Pro python environment</title>
      <link>https://community.esri.com/t5/data-management-questions/ogr2ogr-raises-quot-dll-not-found-quot-error-when/m-p/1206910#M44186</link>
      <description>&lt;P&gt;Thanks Dan. A quick scan of the methods from osgeo.gdal didn't reveal anything that obviously seemed like a substitute for ogr2ogr, but as you said there are a lot of them to sift through. I googled around for "arcgis pro gdal" to see if there's a method reference somewhere, but nothing obvious. Will report back if I find anything.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2022 20:12:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/ogr2ogr-raises-quot-dll-not-found-quot-error-when/m-p/1206910#M44186</guid>
      <dc:creator>DarrenConly</dc:creator>
      <dc:date>2022-08-26T20:12:04Z</dc:date>
    </item>
    <item>
      <title>Re: ogr2ogr raises "DLL not found" error when run from Pro python environment</title>
      <link>https://community.esri.com/t5/data-management-questions/ogr2ogr-raises-quot-dll-not-found-quot-error-when/m-p/1206912#M44187</link>
      <description>&lt;P&gt;Interesting to know, but alas does not directly address the issue. As Dan said, Pro uses a different installation of GDAL, which apparently lacks the DLLs needed to run ogr2ogr command line. The link you provided is specific to the gdal python module (not command line ogr2ogr). As Dan and I's thread above describes, my hope is that perhaps there's a way to run ogr2ogr through the python gdal methods, but figuring that out seems time-consuming and will require some sifting through GDAL's API reference.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2022 20:16:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/ogr2ogr-raises-quot-dll-not-found-quot-error-when/m-p/1206912#M44187</guid>
      <dc:creator>DarrenConly</dc:creator>
      <dc:date>2022-08-26T20:16:42Z</dc:date>
    </item>
  </channel>
</rss>

