8000 python not found (program exited with code: 127) (program exited with code: 126) · Issue #4295 · geany/geany · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

python not found (program exited with code: 127) (program exited with code: 126) #4295

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
abisdad opened this issue Apr 22, 2025 · 5 comments

Comments

@abisdad
Copy link
abisdad commented Apr 22, 2025

Hi,

Just installed lubuntu (Ubuntu 24.10) running LXQt V2.0.0 QT V6.6.2 on an old laptop to give to a kid so he can learn Python.

Then installed Geany Pryce, (built on or after 2024-03-31) Using GTK+ v3.24.43 and GLib v2.82.1 runtime libraries.

Opened it up and tried to run a quick Hello World in Python, but got this message:

/tmp/geany_run_script_MVLB52.sh: 7: python: not found
------------------
(program exited with code: 127)

First thing I worked out was that it needed a .py in the filename, which I manually added. (Still haven't worked out how to do this automatincally - which I believe is possible...) but then this still didn't fix the problem.

If I typed:
python3 Hello\ World.py
It worked fine!

Eventually I dicovered that if I changed the:
Build > Set Build Commands > Execute Command to
python3 "%f"
instead of
python "%f"
It worked!

I've created this as a New Issue as I almost just installed another IDE, but since the fix is so simple, it needs to be documented or fixed.

Thanks,

Rob.

@elextr
Copy link
Member
elextr commented Apr 22, 2025

The python command can be set during the building of the installation. It would appear that your OS has not have the same value that your Geany install has.

@abisdad
Copy link
Author
abisdad commented Apr 22, 2025

Soooo, I'm on my normal PC now, and out of interest, just installed Geany on this one and tried again - with 💯% exactly the same results!
This PC is a Linux Mint 21.1 Cinnamon V5.6.8, with Geany 1.38 Sulamar (built on or after 2021-10-14) Using GTK+ v3.24.33 and GLib v2.72.4 runtime libraries. Not sure why I got V1.38? I installed it using "sudo apt install geany", while the other install was using the lubuntu installation program.

The (program exited with code: 126) was because again I forgot to save the file with a ".py" after the filename... But changed back to (program exited with code: 127) once I remembered to correct this.

Again, the simple fix was as above:
I changed the:
Build > Set Build Commands > Execute Command to
python3 "%f"
instead of
python "%f"

Again it worked!

Also I was just perusing the Geany User Manual but couldn't find a list of program exit codes. Where might one find such a list?

@elextr
Copy link
Member
elextr commented Apr 23, 2025

Not sure why I got V1.38? I installed it using "sudo apt install geany", while the other install was using the lubuntu installation program.

Neither 😁

Installation versions is you and the OS. You are doing something unusual, you need to find your Geany 2.0

The OS that builds the install software includes which python name, so your current one is likely python not python3. That is a selection by OS. OSes follow a range of python names, and some seem to change it every month 😁 . So there is no default name, Geany only uses the one set by the installation system and has no default value.

Build > Set Build Commands > Execute Command to
python3 "%f"

So users can set any command, again its not Geany specific.

Also I was just perusing the Geany User Manual but couldn't find a list of program exit codes. Where might one find such a list?

Well, ummmm, there are errors for lots of stuff, all the libraries have heaps of bug content, for faults for Geany open it as an issue. But only issues that are about Geany, not data being absent or similar.

Things not Geany problems etc for non-Geany (eg python) have nothing in Geany, just too many languages and compilers, and etc etc etc for their data to be in Geany, use the object's own info.

@eht16 eht16 closed this as completed Apr 26, 2025
@eht16
Copy link
Member
eht16 commented Apr 26, 2025

As @elextr said, what Python command is set as default depends on the distribution at creating the binary package.

You could create a bug report at Ubuntu so that they change the default command.
Alternatively, you could install the "python-is-python3" Ubuntu package which adds a symlink for "python" to "python3", then the command in Geany will also work out of the box.

I'm closing this as we cannot do much about this, we provide only the source code package. Just re-open if you disagree.

@abisdad
Copy link
Author
abisdad commented Apr 30, 2025

Thanks for everyone's help on this.
I appreciate what you're saying about it being an OS issue, I don't think I'm doing anything unusual re install - the first one was a clean install for the sole purpose of getting this kid to use Python.
I just wanted to give you guys a bit of feed back from a teacher, who was just trying to get a student into using Geany, and almost came across an insurmountable problem - which would have stopped me using it.
I just thought you'd like the feedback on my experience from someone who isn't a hard core Geany user.
Happy to close. Thanks.

5292

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
0