Select to view content in your preferred language

how to install pywin32 for ArcGIS Pro 3.x

4732
10
Jump to solution
10-18-2022 02:50 PM
TimWhiteaker
Frequent Contributor

How do I install pywin32 for ArcGIS Pro 3.0?  It worked for me in 2.x, but in 3.0, the installation fails whether trying it from the Pro user interface (Settings > Package Manager > 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:

 

from win32com import client

 

I get:

 

ImportError: DLL load failed while importing pythoncom: The specified procedure could not be found.

 

 

I'm using pywin32 and arcpy to update an APRX and an Excel file and export sheets from Excel to PDF.

 

0 Kudos
10 Replies
ChrisSnyder
Honored Contributor

After much struggle - PythonWin lives at ArcGIS Pro v3.3.1!

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 have to install via command prompt.

After installing Pro 3.3.1, to globally install PythonWin (and the 'pywin32' module) to the base ArcGIS Pro Python install:

  1. Start a command window
  2. Execute the following lines:
    1. cd C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3
    2. python -m pip install --upgrade pywin32
    3. python Scripts/pywin32_postinstall.py -install #this step is needed for the global install

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.  After uninstalling and cleaning all that mess up it finally worked. Hooray!

ChrisSnyder_0-1724944749045.jpeg