11

Under the Build menu, I can see 'Execute' option, but it is greyed out.

The only option available is 'Set Includes and Arguments'. When I click that both fields are already filled out. What do I have to write there?

alt text

SilentGhost
  • 307,395
  • 66
  • 306
  • 293
Sergio Tapia
  • 40,006
  • 76
  • 183
  • 254

6 Answers6

9

I don't need to configure anything in Geany. I just hit F5 and the current module is executed.

Are you sure that your file is recognized as a Python source file? Which version of Geany are you using (I am using the SVN version, which is pretty stable; damn, it's rock solid stable ;-))? I have a slightly more developed configuration for Python compilation in my version, but the commands are the same and it works very well.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
gruszczy
  • 40,948
  • 31
  • 128
  • 181
3

I had the same problem and found the following solution:

In the 'Build Options' dialogue, click on '_Execute' at the bottom of the dialogue and the _execute options become editable.

I put the full path name to my Python install in there (C:\Python27\python %F) or (C:\Python32\python %F) and it seems to work just fine.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
2

For some unknown reason a new installed Geany at Ubuntu 19.04 (Disco Dingo) had python "%f" at BuildSet Build CommandsExecute default settings.

I solved a similar issue with python3 "%f" instead.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Kirill Ivanov
  • 77
  • 1
  • 8
  • Thanks I just found your solution during a search to solve the same issue, I am on Linux Mint 20.2 Cinnamon and seeing as typing python in a terminal window won't work because python2 is dead and typing python3 is now needed to start python3, I am a bit surprised that this simple bug has not been fixed yet. – Susan Jan 26 '22 at 08:51
1

Also don’t forget to set the “KeyBinding”, i.e., the keyboard shortcut-key (single or combination) you press to activate “Run, Execute, Compile, Save, Find, Print, etc...

To do so;

Menu EditPreferencesKeyboard Shortcuts.

Here you can choose/change any Key/s to map to any action you want.

Why? Because some other Linux program might have been overridden, or might have taken the default Geany assigned map keys.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
emm meka
  • 11
  • 1
0

You need to set the path variables in the beginning. Or you need to set the variables in Build → set build commands.

This video can give you good clarity:

Install Geany for Python

Your compile path is looking fine. But in the execution path, give the full path of your python.exe. In my case it is...

C:\python27\python "%f"

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Maaza
  • 79
  • 1
  • 1
  • 8
  • Your compile path is lookin fine. But in the execution path give the full path of your python.exe. In my case it is.. **c:\python27\python "%f"** – Maaza Feb 03 '17 at 14:34
-1
  1. Find the Python console path.

  2. Now set the environment variable

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
  • step ->1:check if python is installed by typing python in cmd . step->2 if installed but not showing the it than find the path from right-click->properties step3: set the environment variable and its done – Rahul Joshi Feb 15 '15 at 12:36
  • What is the name of the environment variable? – Peter Mortensen Jun 01 '20 at 20:13