+ Reply to Thread
Results 1 to 6 of 6

Thread: PyWin32-212.win32-py2.6 silent install

  1. #1
    John Trask
    Join Date
    Feb 2011
    Posts
    3
    Points
    1
    Answers Provided
    0


    0

    Default PyWin32-212.win32-py2.6 silent install

    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/2...ilent-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.

  2. #2
    Eynar Gallegos
    Join Date
    Aug 2010
    Posts
    30
    Points
    2
    Answers Provided
    0


    0

    Default Re: PyWin32-212.win32-py2.6 silent install

    Check out the section "How to perform a custom installation of ArcGIS Desktop silently" on the following link:

    http://help.arcgis.com/en/arcgisdesk...000w000000.htm

    Python is listed as a Miscellaneous feature.

  3. #3
    John Trask
    Join Date
    Feb 2011
    Posts
    3
    Points
    1
    Answers Provided
    0


    0

    Default Re: PyWin32-212.win32-py2.6 silent install

    I have Python installed, but that does not include the Python Windows extensions.

  4. #4
    V Stuart Foote

    Join Date
    Apr 2010
    Posts
    1,728
    Points
    595
    Answers Provided
    65


    0

    Default Re: PyWin32-212.win32-py2.6 silent install

    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

    If a post is helpful, or answers your question, or simply annoys you because it is WRONG please use the voting tools on the right side to help identify quality content on the Forum.

    Systems Analyst - Geological Sciences
    The University of Texas at San Antonio
    Classroom & Research support
    Adobe, AutoDesk, ESRI, ERDAS, ESI, Exelis Visual, IHS, Mathworks, Oracle, SAS Inst, Schlumberger, Seismic Micro-Technology, Trimble, Wolfram

  5. #5
    V Stuart Foote

    Join Date
    Apr 2010
    Posts
    1,728
    Points
    595
    Answers Provided
    65


    0

    Default Re: PyWin32-212.win32-py2.6 silent install

    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
    Last edited by vsfoote; 06-30-2011 at 12:36 PM. Reason: typo

    If a post is helpful, or answers your question, or simply annoys you because it is WRONG please use the voting tools on the right side to help identify quality content on the Forum.

    Systems Analyst - Geological Sciences
    The University of Texas at San Antonio
    Classroom & Research support
    Adobe, AutoDesk, ESRI, ERDAS, ESI, Exelis Visual, IHS, Mathworks, Oracle, SAS Inst, Schlumberger, Seismic Micro-Technology, Trimble, Wolfram

  6. #6
    V Stuart Foote

    Join Date
    Apr 2010
    Posts
    1,728
    Points
    595
    Answers Provided
    65


    0

    Default Re: PyWin32-212.win32-py2.6 silent install

    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:
    Code:
    python pywin32_postinstall.py -quiet -install
    Or from anywhere (assuming your $PYTHONPATH variable is set)

    Code:
    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
    Last edited by vsfoote; 06-30-2011 at 12:37 PM.

    If a post is helpful, or answers your question, or simply annoys you because it is WRONG please use the voting tools on the right side to help identify quality content on the Forum.

    Systems Analyst - Geological Sciences
    The University of Texas at San Antonio
    Classroom & Research support
    Adobe, AutoDesk, ESRI, ERDAS, ESI, Exelis Visual, IHS, Mathworks, Oracle, SAS Inst, Schlumberger, Seismic Micro-Technology, Trimble, Wolfram

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts