views:

193

answers:

3

I need to keep a large number of Windows XP machines running the same version of python, with an assortment of modules, one of which is python-win32. I thought about installing python on a network drive that is mounted by all the client machines, and just adjust the path on the clients. Python starts up fine from the network, but when importing win32com I get a pop-up error saying:

The procedure entry point ?PyWinObject_AsHANDLE@@YAHPAU_object@@PAPAXH@Z could not be located in the dynamic link library pywintypes24.dll

after dismissing the message dialog I get in the console:

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

I searched the python directory for the pywintypes24.dll and it is present in "Lib\site-packages\pywin32_system32" .

What am I missing and is there another way in which I can install Python + Python-Win32 + additional module once and have them running on many machines? I don't have access to the Microsoft systems management tools, so I need to be a bit more low-tech than that.

A: 

"""I searched the python directory for the pywintypes24.dll and it is present in "Lib\site-packages\pywin32_system32" """. The existence of the dll is not in question. Is that entry point in that dll?

Have you tried installing exactly the same configuration on a non-network drive?

Have you tried importing other modules in the package?

Have you checked the dlls with the dependency walker or something similar?

Does the "24" in pywintypes24.dll mean Python 2.4? What version of Python are you running?

John Machin
Yes, the DLL contains the quoted entry point, and it has the same md5sum as the DLL on my local C: installation which has no problem loading the win32com module.
florin
A: 

You could use batch files running at boot to

  • Mount the network share (net use \\server\share)
  • Copy the Python and packages installers from the network share to a local folder
  • Check version of the msi installer against the installed version
  • If different, uninstall Python and all version dependent packages
  • Reinstall all packages

This would be pretty much a roll your own central management system for that software.

voyager
+2  A: 

On every machine you have to basically run following pywin32_postinstall.py -install once. Assuming your python installation on the network is N:\Python26, run following command on every client:

N:\Python26\python.exe N:\Python26\Scripts\pywin32_postinstall.py -install

Another important thing is Good Luck!. The reason is that you might need to do this as admin. In my case such setup worked for all but one computer. I still did not figure out why.

van