<?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: Can't find expat module; probably python path issue in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/can-t-find-expat-module-probably-python-path-issue/m-p/399866#M31527</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, I changed the path variables in the HKEY_CURRENT_USER (as seen in the original post, in the last two screenshots) to these:&lt;/P&gt;&lt;P&gt;InstallPath:&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;C:\Python27\ArcGIS10.7\‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PythonPath:&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;C:\Python27\ArcGIS10.7\Lib;C:\Python27\ArcGIS10.7\DLLs\‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It fixed the problem of being unable to use that tool so I'm going to tentatively say my answer is correct. However, I need to test with a few other things to see if I broke anything elsewhere...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Sep 2019 19:23:41 GMT</pubDate>
    <dc:creator>MKF62</dc:creator>
    <dc:date>2019-09-05T19:23:41Z</dc:date>
    <item>
      <title>Can't find expat module; probably python path issue</title>
      <link>https://community.esri.com/t5/python-questions/can-t-find-expat-module-probably-python-path-issue/m-p/399861#M31522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to use the Excel to Table tool and I get a long error message that culminates in this:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;No module named expat; use SimpleXMLTreeBuilder instead&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I have already repaired my ArcGIS installation and that didn't fix it so moving on... Now, I know the expat module exists in the Python 2.7 folder that ArcGIS is supposed to use. When I print the python path in the python window in ArcMap, I get this:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;['', 
u'c:\\program files (x86)\\arcgis\\desktop10.7\\arcpy', 
'c:\\program files (x86)\\arcgis\\desktop10.7\\bin', 
'c:\\program files (x86)\\arcgis\\desktop10.7\\ArcPy', 
'c:\\program files (x86)\\arcgis\\desktop10.7\\ArcToolbox\\Scripts',
'C:\\WINDOWS\\SYSTEM32\\python27.zip',
'C:\\Users\\mfoley10\\AppData\\Local\\Continuum\\anaconda2\\Lib',
'C:\\Users\\mfoley10\\AppData\\Local\\Continuum\\anaconda2\\DLLs',
'C:\\Python27\\ArcGIS10.7\\Lib', 
'C:\\Python27\\ArcGIS10.7\\DLLs', 
'C:\\Python27\\ArcGIS10.7\\Lib\\lib-tk', 
'C:\\WINDOWS\\system32', 
'C:\\Python27\\ArcGIS10.7', 
'C:\\Python27\\ArcGIS10.7\\lib\\site-packages']‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see that it's going into both Python27 folder and an anaconda2 folder. When I go to my registry keys though, I don't see a python 2.7 folder and instead I see 3.7. I have set up my python interpreter in Visual Studio to point to the Python 2.7 interpreter and it works there so all good in VS. It's just the problem in ArcMap. I'm not sure what to do from here. Do I change the Default, Executable, and Window Executable all to point to Python27? It's worth noting that all the other tools I've been using in ArcMap work fine, it's just this one that I've had problems with so far.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="458802" alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/458802_Capture.JPG" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PythonPath folder has this in it:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="458803" alt="" class="image-2 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/458803_Capture.JPG" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above screenshots are in the HKEY_LOCAL_MACHINE. When I go to HKEY_CURRENT_USER, these are the install and python paths which point to anaconda. Maybe these are the ones I need to change? The Visual Studio ones are correct because I have those pointing to the ArcGIS interpreter:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="458804" alt="" class="image-3 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/458804_Capture.JPG" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="458805" alt="" class="image-4 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/458805_Capture.JPG" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:15:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/can-t-find-expat-module-probably-python-path-issue/m-p/399861#M31522</guid>
      <dc:creator>MKF62</dc:creator>
      <dc:date>2021-12-11T18:15:45Z</dc:date>
    </item>
    <item>
      <title>Re: Can't find expat module; probably python path issue</title>
      <link>https://community.esri.com/t5/python-questions/can-t-find-expat-module-probably-python-path-issue/m-p/399862#M31523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Type &lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;help&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'modules'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;in the Interactive Python window in ArcGIS Desktop and see if the module is listed as installed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Sep 2019 18:31:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/can-t-find-expat-module-probably-python-path-issue/m-p/399862#M31523</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2019-09-05T18:31:11Z</dc:date>
    </item>
    <item>
      <title>Re: Can't find expat module; probably python path issue</title>
      <link>https://community.esri.com/t5/python-questions/can-t-find-expat-module-probably-python-path-issue/m-p/399863#M31524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It does not appear that it is. I do see it in C:\Python27\ArcGIS10.7\Lib\xml\parsers, so I at least have it on my computer. Is there some piece of code I need to install it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Sep 2019 18:40:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/can-t-find-expat-module-probably-python-path-issue/m-p/399863#M31524</guid>
      <dc:creator>MKF62</dc:creator>
      <dc:date>2019-09-05T18:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: Can't find expat module; probably python path issue</title>
      <link>https://community.esri.com/t5/python-questions/can-t-find-expat-module-probably-python-path-issue/m-p/399864#M31525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How did you try to install it the first time?&amp;nbsp; Obviously it got installed with one or more of the Python interpreters on your machine, just not the one bundled with ArcGIS Desktop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Sep 2019 18:45:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/can-t-find-expat-module-probably-python-path-issue/m-p/399864#M31525</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2019-09-05T18:45:24Z</dc:date>
    </item>
    <item>
      <title>Re: Can't find expat module; probably python path issue</title>
      <link>https://community.esri.com/t5/python-questions/can-t-find-expat-module-probably-python-path-issue/m-p/399865#M31526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Correct. It's been a while since I installed these things, but I think my order was Visual Studio, ArcGIS, Anaconda (Jupyter). I didn't install anything through command prompts, just through installing various software via GUI. I have never needed to mess with any of my python path variables until now, even though I'm not 100% that it's the problem. ArcMap does seem to use Python27 otherwise no geoprocessing tools would work considering they all run on arcpy. It's just this one tool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wonder if I did 'pip install expat' in a windows cmd prompt if it would work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit: I fixed it. See my answer below.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Sep 2019 18:51:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/can-t-find-expat-module-probably-python-path-issue/m-p/399865#M31526</guid>
      <dc:creator>MKF62</dc:creator>
      <dc:date>2019-09-05T18:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: Can't find expat module; probably python path issue</title>
      <link>https://community.esri.com/t5/python-questions/can-t-find-expat-module-probably-python-path-issue/m-p/399866#M31527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, I changed the path variables in the HKEY_CURRENT_USER (as seen in the original post, in the last two screenshots) to these:&lt;/P&gt;&lt;P&gt;InstallPath:&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;C:\Python27\ArcGIS10.7\‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PythonPath:&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;C:\Python27\ArcGIS10.7\Lib;C:\Python27\ArcGIS10.7\DLLs\‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It fixed the problem of being unable to use that tool so I'm going to tentatively say my answer is correct. However, I need to test with a few other things to see if I broke anything elsewhere...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Sep 2019 19:23:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/can-t-find-expat-module-probably-python-path-issue/m-p/399866#M31527</guid>
      <dc:creator>MKF62</dc:creator>
      <dc:date>2019-09-05T19:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: Can't find expat module; probably python path issue</title>
      <link>https://community.esri.com/t5/python-questions/can-t-find-expat-module-probably-python-path-issue/m-p/399867#M31528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Following this thread from the sidelines: I have ArcGIS 10.6 installed as well as Pro 2.4 and a couple of python envs.&amp;nbsp; I don't see the expat.py when I try what Joshua suggests either, and I see it in the same folder (under 10.6) as you mention.&amp;nbsp; However, I've never had a problem with excel to table, either the tool or running it within a script.&amp;nbsp; I just ran it before typing this response and sure enough, I got the table no problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry this doesn't help resolve your situation, but it sure is a strange one...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Sep 2019 19:24:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/can-t-find-expat-module-probably-python-path-issue/m-p/399867#M31528</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2019-09-05T19:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: Can't find expat module; probably python path issue</title>
      <link>https://community.esri.com/t5/python-questions/can-t-find-expat-module-probably-python-path-issue/m-p/399868#M31529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just fixed it. I don't know if it's broken anything else but I'm tentatively saying that changing the python paths for HKEY_CURRENT_USER (last two screenshots in the original post) to the Python27 paths fixed it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are correct though, expat still does not show up in the modules for me even though everything seems to be working now. Very curious indeed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit: It has not broken anything else. I checked my scripts in PyCharm, Visual Studio, and Jupyter Notebooks and everything is working.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Sep 2019 19:25:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/can-t-find-expat-module-probably-python-path-issue/m-p/399868#M31529</guid>
      <dc:creator>MKF62</dc:creator>
      <dc:date>2019-09-05T19:25:50Z</dc:date>
    </item>
    <item>
      <title>Re: Can't find expat module; probably python path issue</title>
      <link>https://community.esri.com/t5/python-questions/can-t-find-expat-module-probably-python-path-issue/m-p/399869#M31530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Glad you got it figured out!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Sep 2019 20:04:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/can-t-find-expat-module-probably-python-path-issue/m-p/399869#M31530</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2019-09-05T20:04:06Z</dc:date>
    </item>
  </channel>
</rss>

