The CreatorCon Call for Content is officially open! Get started here.

Run Python File from Mid-Server using flow

Syed zabiullah
Tera Expert

Hi Team, 
I created script action in flow that run python script file in Mid Server, I got error like this "

'python' is not recognized as an internal or external command,
operable program or batch file.", but I installed in python in host machine below I have share screenshot of flow and error 

"

Syedzabiullah_0-1715792908076.png

 

Syedzabiullah_1-1715793590455.pngSyedzabiullah_2-1715793622008.png

suggest me any solution for this 



8 REPLIES 8

@Filipe Cruz 
And also, I given path to environment variable as well

Hi @Syed zabiullah  ,

When you do C:\test\test\AppData\Local\Programs\Python\Python312\python.exe py --version, you are executing python.exe and providing "py" as an argument.
I think this is not correct.
use the following:
 
C:\test\test\AppData\Local\Programs\Python\Python312\python.exe --version

I also found this information in StackOverflow:

python is the Python executable of the Python installation which you have selected as a default during the installation. This basically put the path to that version inside the PATH, so that the executable is directly available.

py is the Python launcher which is a utility that comes with Python installations on Windows. It gets installed into C:\Windows\ so it’s available without requiring PATH modifications. The Python launcher detects what Python versions are installed on your machine and is able to automatically delegate to the right version. By default, it will use the latest Python version that is on your machine. So if you have installed 2.7, 3.5 and 3.6, running py will launch 3.6. You can also specify a different version by doing e.g. py -3.5 to lauch 3.5, or py -2 to launch the latest Python 2 version on your machine.


so you can also try to do C:\Windows\py --version

Let me know if this helps!

Please, don't forget to mark my answer as correct if it solves your issue or mark it as helpful if it is relevant for you!

Best Regards,

Filipe Cruz

Hi @Filipe Cruz 
I'm facing same error 

Syedzabiullah_2-1715852043226.png

Syedzabiullah_3-1715852097985.png

 

 

 

 

@Syed zabiullah  

The error is not exactly the same! 
Can you paste here a screenshot of your command line with the output of python --version?
Just to see the full path of your command line.
That should be the problem!