I'm using Geany for the first time. I'm trying to run the sample script I've written (please see screenshot 1) by pressing F5 - normally, this should open the terminal and execute the code.
(According to the documentation, F5 'executes the current file in a terminal emulation'.)
However, I get the error:
/tmp/geany_run_script_SO5U4.sh: 7: python: not found
(program exited with code: 127)
Press return to continue
The text of the script was:
#!/usr/bin/env python 3
print('Python is awesome!')
The code works fine when executed directly from the terminal:
python3 sample_script.py
which outputs Python is awesome!
as expected.
Any suggestions?
python2
orpython3
- so you may need to go into the geany build commands menu and modify the "Execute" command frompython "%f"
topython3 "%f"
. See also python-is-python3 package in Ubuntu 20.04 - what is it and what does it actually do? – steeldriver May 04 '23 at 17:19