5 Replies Latest reply on Jun 30, 2011 12:18 PM by vsfoote

    PyWin32-212.win32-py2.6 silent install

    jtrask@reuniontower.com
      Does anyone know how to install the PyWin32 that came on my ArcGIS Desktop 10.0 DVD silently?

      Here (http://www.jordanrinke.com/2011/06/22/pywin32-silent-install/) I found these instructions:

         (Instructions specific to Python 2.6.x but should be easy to adapt)
         1. Extract the .exe installer (I use UniExtract http://legroom.net/software/uniextract)
         2. It will create 2 directories PLATLIB and SCRIPTS copy the contents of both directores in to c:\python26\lib\site-packages
         3. Then cd to c:\python26\lib\site-packages and run �??python pywin32_postinstall.py -install�?�
         4. Remove pywin32_postinstall.py
         5. That will install PyWin32 silently.

      I tweaked this command line to:
      C:\python26\arcgis10.0\python.exe c:\python26\arcgis10.0\lib\site-packages\scripts\pywin32_postinstall.py -install

      This doesn't work.  I receive this:

        File "c:\Python26\ArcGIS10.0\Lib\Site-Packages\SCRIPTS\PyWin32_postins
      , line 565, in <module>
          install()
        File "c:\Python26\ArcGIS10.0\Lib\Site-Packages\SCRIPTS\PyWin32_postins
      , line 289, in install
          LoadSystemModule(lib_dir, "pywintypes")
        File "c:\Python26\ArcGIS10.0\Lib\Site-Packages\SCRIPTS\PyWin32_postins
      , line 150, in LoadSystemModule
          ('.dll', 'rb', imp.C_EXTENSION))
      ImportError: DLL load failed: The specified module could not be found.
        • Re: PyWin32-212.win32-py2.6 silent install
          egallegos-esristaff
          Check out the section "How to perform a custom installation of ArcGIS Desktop silently" on the following link:

          http://help.arcgis.com/en/arcgisdesktop/10.0/install_guides/arcgis_desktop_install_guide/index.html#//00870000000w000000.htm

          Python is listed as a Miscellaneous feature.
          • Re: PyWin32-212.win32-py2.6 silent install
            jtrask@reuniontower.com
            I have Python installed, but that does not include the Python Windows extensions.
            • Re: PyWin32-212.win32-py2.6 silent install
              vsfoote
              John,

              Interesting question.  I think you're close.

              Obviously this won't work if Python is not first installed.

              I'll play with the Jordan Rinke suggested steps and see if I can cook up a recipe suitable for command line or scripted deployment.

              Stuart
              • Re: PyWin32-212.win32-py2.6 silent install
                vsfoote
                John,

                Looking at the Rinke's write up and your error--did you extract the "contents" of the two folders, PLATLIB and SCRIPTS into the c:\python26\arcgis10.0\lib\site-packages folder? Or did you incorrectly extract the whole folders there? 

                Suggest you use 7zip to open the installer package, and use that to copy out contents.

                Believe Rinke's suggestion (with input from Mark Hammond) was to end up with the pywin32_postinstall.py in the site-packages folder along with the contents from the PLATLIB folder.

                Looking at a GUI install, the PLATLIB folder contents do end up in lib\site-packages with the default installation.

                Make that adjustment and see if you have better result.  And if that's good, still a little more work to prep the folders for command line or batch scripted deployment.

                Stuart
                • Re: PyWin32-212.win32-py2.6 silent install
                  vsfoote
                  John,

                  I've verified that this works correctly with the installer from the DVD, or a newer SourceForge Python for Windows project download, if you extract the contents of the installer into the site-packages folder.

                  Change directory into to the lib\site-packages folder and issue the command:
                  python pywin32_postinstall.py -quiet -install


                  Or from anywhere (assuming your $PYTHONPATH variable is set)

                  python C:\Python2.6\ArcGIS10.0\lib\site-packages\python\pywin32_postinstall.py -quiet -install


                  You can remove the postinstall script once finished.

                  You still need to deal with extracting the folder contents from the PyWin32-xxx.win32-py2.6.exe installer and deploying them to the Python2.6 lib\site-packages folder in advance of your "silent" install.

                  Something to consider, installing "silent" this way does not call the bdist_wininst routines that Mark Hammond uses in the PyWin32 installer.  So there are no add/remove program hooks laid down, and a WISE style log of the install is not recorded. Meaning that if you later need to maintain or update the Python for Windows package you will need to manually uninstall the package and adjust registry. Not a big deal, just something to be aware of.

                  Stuart