How can I configure Geany to compile and run my Python programs?

后端 未结 6 1494
夕颜
夕颜 2021-01-04 21:26

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

相关标签:
6条回答
  • 2021-01-04 21:47

    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"

    0 讨论(0)
  • 2021-01-04 21:49
    1. Find the Python console path.

    2. Now set the environment variable

    0 讨论(0)
  • 2021-01-04 21:50

    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.

    0 讨论(0)
  • 2021-01-04 21:54

    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.

    0 讨论(0)
  • 2021-01-04 22:04

    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.

    0 讨论(0)
  • 2021-01-04 22:06

    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.

    0 讨论(0)
提交回复
热议问题