【发布时间】:2022-07-06 16:59:05
【问题描述】:
我正在做一些自动化,其中 python 脚本需要由 PowerShell 脚本执行。 如果我从 PowerShell(例如 ISE)执行 python,一切正常。在实际流程中,PowerShell 函数首先由使用此 PowerShell 脚本的应用程序执行,而后者又必须调用在该 PowerShell 函数中调用的 Python 脚本。
但是,每次 App 执行这个 PowerShell 时,python 都没有被调用。 环境变量也设置正确。 不知道在哪里寻找错误。有什么线索吗?
我只是将python脚本称为:
py "C:\Program Files\<some location>\script.py" $arg1 $arg2
【问题讨论】:
标签: python-3.x powershell