Python Forum

Full Version: "System cannot find path specified"(Geany)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I was happily using Geany to write Python 3.2 programs. I upgraded to Python 3.9 and Geany and now Geany doesn't run Python! Any help appreciated!
Thanks in advance.

THE SIMPLE PYTHON TEST PROGRAM I TYPED INTO GEANY AND THEN HIT THE EXECUTE BUTTON...
import sys
print("Hello")

THE ERROR MESSAGE I GET...
"The system cannot find the path specified.
(program exited with code: 3)
Press any key to continue . . ."

PS I also tried without import sys and I get the same error message

IF I RUN PYTHON DIRECTLY (VIA CMD) IT WORKS...
Microsoft Windows [Version 10.0.19042.804]
© 2020 Microsoft Corporation. All rights reserved.
C:\Users\PRIVATE>python
Python 3.9.2 (tags/v3.9.2:1a79785, Feb 19 2021, 13:44:55) [MSC v.1928 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> print("hello")
hello
>>>

MY SYSTEM...
W10 Professional
Python 3.9.2
Geany 1.37.1

MY ENVIROMENT VARIABLES...
User variables
Python C:\Program Files\Python39

System variables
Path C:\Program Files\Python39\Scripts\; C:\Program Files\Python39\
Python39 C:\Program Files\Python39

Oh for a world where they don't upgrade working programs! Smile
Your Path look okay as python works from cmd,also look at Python 3.9/3.8 and pip installation under Windows
Go into Build ➡ Set Build Commands.
Then last Execute Commands
python "%f"
# Or not close window
python -i "%f"
Alternative for a better REPL install ptpython
Then in Geany:
ptpython -i "%f"
So if i push Execute button:
s = 'hello'
print(s) 
Then can continue to test and get better autocompletion and color.
[Image: wm8XYQ.png]

As a alternative look at on of the best Python editor out there VS Code.
VS Code from start
(Mar-18-2021, 03:16 AM)kiwi99 Wrote: [ -> ]I was happily using Geany to write Python 3.2 programs. I upgraded to Python 3.9 and Geany and now Geany doesn't run Python! Any help appreciated!
Thanks in advance.

THE SIMPLE PYTHON TEST PROGRAM I TYPED INTO GEANY AND THEN HIT THE EXECUTE BUTTON...
import sys
print("Hello")

THE ERROR MESSAGE I GET...
"The system cannot find the path specified.
(program exited with code: 3)
Press any key to continue . . ."

...

Oh for a world where they don't upgrade working programs! Smile

In desperation I uninstalled geany 1.37.1 and reinstalled geany 1.29 and, guess what, geany now runs my python 3.9!
Smile Big Grin

PS: The set build commands are now...
Python command
python -m py_compile "%f"
Execute command
python "%f"