【发布时间】:2016-01-15 09:54:08
【问题描述】:
我在 Linux 系统上使用 Fabric 已经有一段时间了,我从来没有遇到过任何问题。然而,现在我已经涉足Windows,我就是没有什么可以合作的。
我已经在远程 Windows 8.1 系统上安装了 openSSHd,我可以发送像 run('ipconfig', shell=False) 这样的非 shell 命令,它们会按预期运行,但如果我尝试以下操作。
def runscripts_W():
env.user = 'tester'
env.password = 'password'
env.cwd = 'C:/fabric_upload'
run('python runscripts.py')
我刚收到Unable to execute command or shell on remote system: Failed to Execute Process
我已经尝试安装 MinGW 并尝试解决方案 here,但我猜测 Msys/MinGW 不能与 Python 3.5 一起使用,因为即使在使用 python 路径编辑 Msys fstab 文件后,我也会返回那个没有找到 python 命令,不能降级。
有人对 Windows 上的 Fabric 有任何经验吗?我知道它并不是真的适用于 Windows,但它似乎能够连接和发送命令......我只需要让机器启动 python 脚本。这么近,这么远……
【问题讨论】:
-
那么,您想在远程 Windows 机器上运行 python 脚本吗?那里有python可用吗?如果没有,你可以在那里安装 IronPython (IronPython)
-
是的,python 安装在所有远程机器上,但 IronPython 会帮助调用普通的 python 脚本吗?我以为只是让 Python 调用 .NET 对象等。