Error Cannot run program "python"

331 views
Skip to first unread message

Simone Bianchelli

unread,
May 6, 2024, 1:11:50 PM5/6/24
to rundeck-discuss
Hello, i have installed latest Rundeck OSS on a Windows Server 2019 VM, configured it following the guides and setup WinRM to connect to other Windows hosts in the same domain. In the project that i setup on Default Node Executor and Default File Copier as Interpreter i left "python" (not python2 or python3). Every command i execute (eg. python --version) or script it always return the following error:

Failed: IOFailure: [WinRMPython] Cannot run program "python": CreateProcess error=2, The system cannot find the file specified
Execution failed: 18 in project Windows: [Workflow result: , step failures: {1=Dispatch failed on 1 nodes: [CMBUILD: IOFailure: [WinRMPython] Cannot run program "python": CreateProcess error=2, The system cannot find the file specified + {dataContext=MultiDataContextImpl(map={}, base=null)} ]}, Node failures: {CMBUILD=[IOFailure: [WinRMPython] Cannot run program "python": CreateProcess error=2, The system cannot find the file specified + {dataContext=MultiDataContextImpl(map={}, base=null)} ]}, status: failed]

But Python and pywinrm are installed (i have only one instance of Python and installed for the current user) and Python path added to Windows envirnoment variables in PATH.
If i open cmd and type "python --version" it works.
I also tried to uninstall and reinstall both Python and pywinrm.

I found a similar thread of another user had same problem but he was under Linux where he had Rundeck installed and the solution given can't be applied to my context.

Any help appreciated, thanks.

rac...@rundeck.com

unread,
May 6, 2024, 1:27:12 PM5/6/24
to rundeck-discuss
Hi Simone,

It seems that you're facing this (check the Mezam solution). Is your Python environment installed using the standard setup? I've tested it here.

Regards!

Simone Bianchelli

unread,
May 7, 2024, 5:07:57 AM5/7/24
to rundeck-discuss
Hello, thanks for the link, followed all instructions you posted in the other thread, Python is installed with standard setup (the one provided for Windows in the official website, v3.12) and installed system-wide (i also tried installing it for the current domain user s_gruppocm, which is admin of the machine and the same user used to setup Rundeck), installed also pywinrm and all needed dependencies.
From cmd if i type the command: where python
the output is:
C:\Program Files\Python312\python.exe

Also Windows environment variable PATH is correct.
I created new project and setup (intepreter: python) and also created a new resources.xml.

But still getting error message: Failed: IOFailure: [WinRMPython] Cannot run program "python": CreateProcess error=2, The system cannot find the file specified

P.S.: if can be useful as information when i setup Rundeck for the first time some weeks ago it was working and i did some executions, then i changed etc\framework.properties file in this way:

framework.server.name = 161.27.160.71
framework.server.hostname = portalecm.europe.adnet
framework.server.port = 4440
framework.server.url = http://161.27.160.71:4440

and server\rundeck-config.properties in this way:
server.address=161.27.160.71
server.port=4440
grails.serverURL=http://161.27.160.71:4440

instead of localhost because i need that Rundeck address must be reached from other users in the same domain (opening the browser from their PC), instead of localhost (connecting in RDP to the machine where Rundeck is installed and run it using the address http://localhost:4440)

From that time seems i started having the error on the executions.

Thanks.

Simone Bianchelli

unread,
May 7, 2024, 8:02:00 AM5/7/24
to rundeck-discuss
Hi, i don't know how i solved it but i restarted the machine again (but i did also previous days) and now magically made it worked!
It's strange because the Windows environment variable was already set, i didn't touched it.

Reply all
Reply to author
Forward
0 new messages