<?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: how to install pywin32 for ArcGIS Pro 3.x in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-to-install-pywin32-for-arcgis-pro-3-x/m-p/1223109#M65877</link>
    <description>&lt;P&gt;Your attempts to install what is already there (at least parts of it) may have had undesireable consequences.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from win32com import client

dir(client)
['CDispatch', 'CLSIDToClass', 'CastTo', 'CoClassBaseClass', 'Constants', 
'Dispatch', 'DispatchBaseClass', 'DispatchEx', 'DispatchWithEvents', 'EventsProxy', 'GetActiveObject', 'GetObject', 'Moniker', 'Record', 
'VARIANT', 'WithEvents', '_PyIDispatchType', '__WrapDispatch', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', 
'__name__', '__package__', '__path__', '__spec__', '_event_setattr_', 
'_get_good_object_', '_get_good_single_object_', 'build', 'constants', 
'dynamic', 'gencache', 'getevents', 'pythoncom', 'pywintypes', 'sys']&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Delete your clone (or reinstall Pro if you tried this in base.&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;conda install xxxxxx --dry-run&lt;/P&gt;&lt;P&gt;Is a useful step to anticipate installation issues beforehand.&lt;/P&gt;</description>
    <pubDate>Tue, 18 Oct 2022 22:45:31 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2022-10-18T22:45:31Z</dc:date>
    <item>
      <title>how to install pywin32 for ArcGIS Pro 3.x</title>
      <link>https://community.esri.com/t5/python-questions/how-to-install-pywin32-for-arcgis-pro-3-x/m-p/1223077#M65876</link>
      <description>&lt;P&gt;How do I install pywin32 for ArcGIS Pro 3.0?&amp;nbsp; It worked for me in 2.x, but in 3.0, the installation fails whether trying it from the Pro user interface (Settings &amp;gt; Package Manager &amp;gt; Add Packages) or in a Python command prompt using conda install or pip install. There seems to be a lot of conflicts in dependency versions. After attempting to install, if I run this code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from win32com import client&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;ImportError: DLL load failed while importing pythoncom: The specified procedure could not be found.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using pywin32 and arcpy to update an APRX and an Excel file and export sheets from Excel to PDF.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2022 21:50:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-install-pywin32-for-arcgis-pro-3-x/m-p/1223077#M65876</guid>
      <dc:creator>TimWhiteaker</dc:creator>
      <dc:date>2022-10-18T21:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: how to install pywin32 for ArcGIS Pro 3.x</title>
      <link>https://community.esri.com/t5/python-questions/how-to-install-pywin32-for-arcgis-pro-3-x/m-p/1223109#M65877</link>
      <description>&lt;P&gt;Your attempts to install what is already there (at least parts of it) may have had undesireable consequences.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from win32com import client

dir(client)
['CDispatch', 'CLSIDToClass', 'CastTo', 'CoClassBaseClass', 'Constants', 
'Dispatch', 'DispatchBaseClass', 'DispatchEx', 'DispatchWithEvents', 'EventsProxy', 'GetActiveObject', 'GetObject', 'Moniker', 'Record', 
'VARIANT', 'WithEvents', '_PyIDispatchType', '__WrapDispatch', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', 
'__name__', '__package__', '__path__', '__spec__', '_event_setattr_', 
'_get_good_object_', '_get_good_single_object_', 'build', 'constants', 
'dynamic', 'gencache', 'getevents', 'pythoncom', 'pywintypes', 'sys']&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Delete your clone (or reinstall Pro if you tried this in base.&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;conda install xxxxxx --dry-run&lt;/P&gt;&lt;P&gt;Is a useful step to anticipate installation issues beforehand.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2022 22:45:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-install-pywin32-for-arcgis-pro-3-x/m-p/1223109#M65877</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-10-18T22:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: how to install pywin32 for ArcGIS Pro 3.x</title>
      <link>https://community.esri.com/t5/python-questions/how-to-install-pywin32-for-arcgis-pro-3-x/m-p/1223120#M65879</link>
      <description>&lt;P&gt;I was working in a clone. I switched back to base (arcgispro-py3) and get this in a Python command prompt.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;(arcgispro-py3) C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3&amp;gt;python
Python 3.9.11 [MSC v.1931 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
&amp;gt;&amp;gt;&amp;gt; from win32com import client
Traceback (most recent call last):
  File "&amp;lt;stdin&amp;gt;", line 1, in &amp;lt;module&amp;gt;
ModuleNotFoundError: No module named 'win32com'&lt;/LI-CODE&gt;&lt;P&gt;I'm in Pro 3.0.0.&amp;nbsp; Is it possible that attempting to install pywin32 in the clone corrupted the base installation?&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2022 00:06:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-install-pywin32-for-arcgis-pro-3-x/m-p/1223120#M65879</guid>
      <dc:creator>TimWhiteaker</dc:creator>
      <dc:date>2022-10-19T00:06:18Z</dc:date>
    </item>
    <item>
      <title>Re: how to install pywin32 for ArcGIS Pro 3.x</title>
      <link>https://community.esri.com/t5/python-questions/how-to-install-pywin32-for-arcgis-pro-3-x/m-p/1223137#M65881</link>
      <description>&lt;P&gt;I am using 3.0.2.&lt;/P&gt;&lt;P&gt;I can't remember when pywin32 stuff appeared.&lt;/P&gt;&lt;P&gt;Messing with the clone can't affect the base environment.&lt;/P&gt;&lt;P&gt;You can also look at&lt;/P&gt;&lt;P&gt;&lt;A href="https://pypdf2.readthedocs.io/en/latest/" target="_blank"&gt;Welcome to PyPDF2 — PyPDF2 documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://xlrd.readthedocs.io/en/latest/" target="_blank"&gt;xlrd — xlrd 2.0.1 documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://xlwt.readthedocs.io/en/latest/" target="_blank"&gt;xlwt documentation — xlwt 1.3.0 documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;for other options if you can resolve, they are installed by esri and I think used somewhere in the Pro ecosystem.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2022 02:22:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-install-pywin32-for-arcgis-pro-3-x/m-p/1223137#M65881</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-10-19T02:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: how to install pywin32 for ArcGIS Pro 3.x</title>
      <link>https://community.esri.com/t5/python-questions/how-to-install-pywin32-for-arcgis-pro-3-x/m-p/1223421#M65894</link>
      <description>&lt;P&gt;Thanks for the other things to look at but I don't think they handle exporting PDFs from Excel.&lt;/P&gt;&lt;P&gt;With a clean install of Pro 3.0, I upgraded to 3.0.2, and I still don't have pywin32 installed.&amp;nbsp; A search for "win" in the Package Manager in Pro reveals these libraries that seem close but not quite it:&lt;/P&gt;&lt;P&gt;* python-certifi-win32&lt;/P&gt;&lt;P&gt;* pywin32-security&lt;/P&gt;&lt;P&gt;For an import test, this time I tried from within a Python console window in Pro. I get "No module named 'win32com'".&amp;nbsp; I wonder how you have pywin32 but I don't.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="console window" style="width: 365px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/53963i4A27E34EB7FEE09A/image-size/large?v=v2&amp;amp;px=999" role="button" title="console.png" alt="console window" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;console window&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2022 16:31:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-install-pywin32-for-arcgis-pro-3-x/m-p/1223421#M65894</guid>
      <dc:creator>TimWhiteaker</dc:creator>
      <dc:date>2022-10-19T16:31:09Z</dc:date>
    </item>
    <item>
      <title>Re: how to install pywin32 for ArcGIS Pro 3.x</title>
      <link>https://community.esri.com/t5/python-questions/how-to-install-pywin32-for-arcgis-pro-3-x/m-p/1223850#M65905</link>
      <description>&lt;P&gt;The solution I found:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;In Pro 3.0 or 3.0.2 (tested on both), clone the base environment and activate the new environment.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Add the pywin32 package.&lt;/LI&gt;&lt;LI&gt;Browse to the environment folder (e.g., C:\Users\username\AppData\Local\ESRI\conda\envs\my-new-env) in an elevated Python command prompt and enter this command: python.exe Scripts/pywin32_postinstall.py -install&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Now I can use pywin32. That last step was a tip I gleaned from &lt;A title="Gohlke's wheel page" href="https://www.lfd.uci.edu/~gohlke/pythonlibs/#pywin32" target="_blank" rel="noopener"&gt;Gohlke's wheel page&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;This was done on a virtual machine. On my physical machine, the admins have some security thing going on that prevents me from installing the pywin32 package, but others may not encounter such an issue.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 15:21:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-install-pywin32-for-arcgis-pro-3-x/m-p/1223850#M65905</guid>
      <dc:creator>TimWhiteaker</dc:creator>
      <dc:date>2022-10-20T15:21:43Z</dc:date>
    </item>
    <item>
      <title>Re: how to install pywin32 for ArcGIS Pro 3.x</title>
      <link>https://community.esri.com/t5/python-questions/how-to-install-pywin32-for-arcgis-pro-3-x/m-p/1524371#M71279</link>
      <description>&lt;P&gt;Hi Tim,&lt;/P&gt;&lt;P&gt;I am currenlty using arcGIS pro version 3.3.1 and the package "pywin32" isn't available to add. Do you know why or any work around to get pywin32 package installed in this version.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2024 13:54:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-install-pywin32-for-arcgis-pro-3-x/m-p/1524371#M71279</guid>
      <dc:creator>EmmaButzler</dc:creator>
      <dc:date>2024-08-20T13:54:55Z</dc:date>
    </item>
    <item>
      <title>Re: how to install pywin32 for ArcGIS Pro 3.x</title>
      <link>https://community.esri.com/t5/python-questions/how-to-install-pywin32-for-arcgis-pro-3-x/m-p/1528737#M71325</link>
      <description>&lt;P&gt;I'm having the same issue as you Emma and Tim. Prior to updating to Pro v3.3.1 I was able to install PythonWin which also installs pywin32... and I've always installed to the base Python install. PythonWin seems to install but errors out now upon attempting to start the PythonWin IDE (error message: "The application can not locate Python39.dll (126) The specified module could not be found"). Also, perhaps more concerning, other modules I use that depend on pywin32 such as 'pyad' (Python access to MS Active Directly)&amp;nbsp; and 'win32com' (Excel) all error out now:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;Python 3.11.8 (main, Mar 22 2024, 13:25:41) [MSC v.1938 64 bit (AMD64)] :: Anaconda, Inc. on win32&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;Type "help", "copyright", "credits" or "license" for more information.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;gt;&amp;gt;&amp;gt; from win32com import client&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;Traceback (most recent call last):&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;File "&amp;lt;stdin&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\win32com\__init__.py", line 8, in &amp;lt;module&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;import pythoncom&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\pythoncom.py", line 2, in &amp;lt;module&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;import pywintypes&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\win32\lib\pywintypes.py", line 126, in &amp;lt;module&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;__import_pywin32_system_module__("pywintypes", globals())&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\win32\lib\pywintypes.py", line 52, in __import_pywin32_system_module__&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;import _win32sysloader&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;ImportError: DLL load failed while importing _win32sysloader: The specified module could not be found.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2024 15:55:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-install-pywin32-for-arcgis-pro-3-x/m-p/1528737#M71325</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2024-08-28T15:55:31Z</dc:date>
    </item>
    <item>
      <title>Re: how to install pywin32 for ArcGIS Pro 3.x</title>
      <link>https://community.esri.com/t5/python-questions/how-to-install-pywin32-for-arcgis-pro-3-x/m-p/1528890#M71339</link>
      <description>&lt;P&gt;I was able to install it in ArcGIS Pro using a pip install as follows:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1) Open the command prompt by typing “command prompt” or cmd in the Windows search.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2) Assuming your Python cloned environment is in the default location, type this command* (inserting your own username in the path):&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;C:\Users\&lt;/SPAN&gt;&lt;SPAN&gt;[yourUsername]&lt;/SPAN&gt;&lt;SPAN&gt;\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone\python.exe -m pip install pywin32&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If you are not using the default location, alter the file path to where your own clone is stored.&amp;nbsp; For example, if my username is Elmer and I created a clone in this location, C:\Users\Elmer\AppData\doubletree\arcgispro-py3-myclone2, I would use this command:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;C:\Users\Elmer\AppData\doubletree\arcgispro-py3-myclone2&lt;/SPAN&gt;&lt;SPAN&gt;\python.exe -m pip install pywin32&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;3) Navigate to the file in which pywin32 has been downloaded (your cloned environment &amp;gt; Lib &amp;gt; site-packages &amp;gt; pythonwin)&lt;/P&gt;&lt;P&gt;4)&amp;nbsp;&lt;SPAN&gt;Open Pythonwin.exe and try importing arcpy.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2024 18:01:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-install-pywin32-for-arcgis-pro-3-x/m-p/1528890#M71339</guid>
      <dc:creator>LauraTateosian_augori</dc:creator>
      <dc:date>2024-08-28T18:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: how to install pywin32 for ArcGIS Pro 3.x</title>
      <link>https://community.esri.com/t5/python-questions/how-to-install-pywin32-for-arcgis-pro-3-x/m-p/1529131#M71346</link>
      <description>&lt;P&gt;I'm still on 3.2, where the previous solution I posted worked. If anything changes once I migrate to 3.3, I'll share results here. I think Esri prefers you to make a clone of the default environment, and add packages to the clone rather than modify the default environment.&amp;nbsp; But if you found a solution that worked, then hooray!&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2024 01:42:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-install-pywin32-for-arcgis-pro-3-x/m-p/1529131#M71346</guid>
      <dc:creator>TimWhiteaker</dc:creator>
      <dc:date>2024-08-29T01:42:30Z</dc:date>
    </item>
    <item>
      <title>Re: how to install pywin32 for ArcGIS Pro 3.x</title>
      <link>https://community.esri.com/t5/python-questions/how-to-install-pywin32-for-arcgis-pro-3-x/m-p/1529471#M71350</link>
      <description>&lt;P&gt;After much struggle - PythonWin lives at ArcGIS Pro v3.3.1!&lt;/P&gt;&lt;P&gt;For future reference, the PythonWin.exe installer no longer works for Pro 3.3.1 – at least in Pro’s anaconda environment - and you seemly &lt;U&gt;have to&lt;/U&gt;&amp;nbsp;install via command prompt.&lt;/P&gt;&lt;P&gt;After installing Pro 3.3.1, to globally install PythonWin (and the 'pywin32' module) to the base ArcGIS Pro Python install:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Start a command window&lt;/LI&gt;&lt;LI&gt;Execute the following lines:&lt;/LI&gt;&lt;OL&gt;&lt;LI&gt;cd C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3&lt;/LI&gt;&lt;LI&gt;python -m pip install --upgrade pywin32&lt;/LI&gt;&lt;LI&gt;python Scripts/pywin32_postinstall.py -install #this step is needed for the global install&lt;/LI&gt;&lt;/OL&gt;&lt;/OL&gt;&lt;P&gt;My issue was that I had (only partially) installed PythonWin via the .exe installer, which was fudging up the whole thing.... pip wouldn't work... all messed up.&amp;nbsp; After uninstalling and cleaning all that mess up it finally worked. Hooray!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChrisSnyder_0-1724944749045.jpeg" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/113850i0C95A70B2498ED17/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChrisSnyder_0-1724944749045.jpeg" alt="ChrisSnyder_0-1724944749045.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2024 15:23:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-install-pywin32-for-arcgis-pro-3-x/m-p/1529471#M71350</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2024-08-29T15:23:24Z</dc:date>
    </item>
  </channel>
</rss>

