问题描述
我需要保留大量运行相同版本 python 的 Windows XP 机器,以及各种模块,其中之一是 python-win32.我想过在所有客户端机器都挂载的网络驱动器上安装python,只需调整客户端上的路径即可.Python 从网络启动正常,但在导入 win32com 时,我收到一个弹出错误消息:
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:
在动态链接库pywintypes24.dll中找不到过程入口点?PyWinObject_AsHANDLE@@YAHPAU_object@@PAPAXH@Z
关闭消息对话框后,我进入控制台:
after dismissing the message dialog I get in the console:
导入错误:DLL 加载失败:找不到指定的程序.
我在 python 目录中搜索了 pywintypes24.dll,它存在于 "Lib\site-packages\pywin32_system32" 中.
I searched the python directory for the pywintypes24.dll and it is present in "Lib\site-packages\pywin32_system32" .
我缺少什么,还有另一种方法可以安装 Python + Python-Win32 + 附加模块一次并让它们在多台机器上运行吗?我无法访问 Microsoft 系统管理工具,所以我需要比这更低技术.
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.
推荐答案
在每台机器上,您基本上都必须按照 pywin32_postinstall.py -install
运行一次.假设你在网络上安装的python是N:\Python26
,在每个客户端上运行以下命令:
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
另一件重要的事情是祝你好运!
.原因是您可能需要以 admin
身份执行此操作.就我而言,这种设置适用于除一台计算机之外的所有计算机.我还是不明白为什么.
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.
这篇关于在网络驱动器上安装带有 python win32 扩展的 python的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!