Error "Command not found" using Komodo IDE for Python

913 Views Asked by At

I'm using the Komodo IDE for Mac 10.10.5 and trying a simple code to run a youtube video via python. Once I save and run the python file, i get the following error:

"/bin/sh: Python-1.py: command not found"

I appreciate any help, thank you!

#!/usr/bin/env python
import webbrowser
webbrowser.open(https://www.youtube.com/watch?v=cLyUcAUMmMY")
1

There are 1 best solutions below

8
On

You have to tell Komodo Run Command that you're executing a Python file (same as in the terminal).

You can use the Komodo interpolation feature:

%(python) %F

That tells Komodo to use the Python2 interpreter configured in your preferences and to run the currently active file in the editor.

Or you can also simply enter the exact command you would normally enter in terminal:

python Python-1.py

NOTE: If you're using Komodo IDE you have the debugger and Debug menu > Run Without Debugging.