Tyler Hendrick
Tyler Hendrick

Reputation: 86

How to get Geany working with Python?

I'm trying to run Python 2.7 on Geany, and every time I run the code, I am getting this:

'C:\Python27\Python"first.py"' is not recognized as an internal or external comm and, operable program or batch file. Press any key to continue . . .

I have added ;c:\Python27 to the PATH in the settings and set up the execute button in the set build commands menu.

I am new to python, and I would like to do this to learn. Please help!

Upvotes: 2

Views: 3468

Answers (1)

SuperGeo
SuperGeo

Reputation: 793

I think Geany automatically sets this up as soon as you save the file with a .py extension.

Anyway, you can try the following (I'm not using an english interface so the actual names might be a little different):

Go to Build -> Define build commands in the upper toolbar, then at the bottom, in Execute commands, you can use the following command for the _Execute label:

python "%f"

Then you should be able to run from the interface run button (F5). You must have python in you PATH variable for it to work, otherwise I believe you can use

C:\Python27\python %f

Upvotes: 3

Related Questions