【问题标题】:Python not getting invoked by PowershellPython 没有被 Powershell 调用
【发布时间】: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


    【解决方案1】:

    您遇到了什么错误?

    你能详细说明一下吗?

    你试过用“python”代替

    【讨论】:

      猜你喜欢
      • 2014-09-01
      • 2022-10-12
      • 2015-12-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-11-15
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多