Home > Software design >  Python not getting invoked by Powershell
Python not getting invoked by Powershell

Time:07-07

I am working on some automation where a python script need to be executed by a PowerShell script. If I execute the python from the PowerShell (e.g., ISE), it all works fine. In the actual flow, the PowerShell function is first executed by the Application which uses this PowerShell script, which in turn must invoke the python script being called in that PowerShell function.

However, every time App executes this PowerShell, the python is not being invoked at all. The Environment variables are also set properly. Not sure where to look for errors. Any leads ?

I am simply calling the python script as:

py "C:\Program Files\<some location>\script.py" $arg1 $arg2

CodePudding user response:

which error you are getting?

can you elaborate more?

have you tried with "python" instead

CodePudding user response:

My bad. I guess i should have done a bit more troubleshooting. The issue was because of a Python module which was not installed for all user (including the one which application uses to invoke the script). Once installed, it works fine.

  • Related