Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing python with python win32 extensions on a network drive

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.

like image 670
florin Avatar asked Feb 23 '10 15:02

florin


People also ask

Where should Python packages be installed?

Locally installed Python and all packages will be installed under a directory similar to ~/. local/bin/ for a Unix-based system, or \Users\Username\AppData\Local\Programs\ for Windows.

What is Win32 in Python?

PyWin32 is a library of Python extensions for Windows that enables you to use the features of the Win32 application programming interface (API) on Python.

How do you Intall Python?

To install Python, you need to download the official Python executable installer. Next, you need to run this installer and complete the installation steps. Finally, you can configure the PATH variable to use python from the command line. You can choose the version of Python you wish to install.


1 Answers

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.

like image 53
van Avatar answered Sep 29 '22 10:09

van