rota90
rota90

Reputation: 259

couldn't execute "python": no such file or directory

I am trying to execute python from tcl script but i have the message error "couldn't execute "python": no such file or directory"

This is my code: test.py

print('hello')

exec.tcl

set out [exec python test.py]
puts $out

and in Windows PowerShell i use this command:

tclsh exec.tcl 

Could you please help me fix this error?

Upvotes: 0

Views: 3989

Answers (1)

Alexander Santos
Alexander Santos

Reputation: 1691

Depending on your Python's version, it may use py as command. You should try using 'py' instead of 'python'.

More info: Python Launcher for Windows (Python Docs)

Upvotes: 4

Related Questions