So to make Geany execute your files with python 3.0 you have to:
- Open a terminal
- Go to your templates folder of Geany. In my case it was /usr/local/share/geany. So the command is cd /usr/local/share/geany/
- Open filetypes.python with super user privileges. sudo gedit filetypes.python
- Scroll down to the bottom of the file. Change the last two lines to
- compiler=python3.0 -c "import py_compile; py_compile.compile('%f')"
run_cmd=python3.0 "%f" - Restart Geany if open
- Test your version with the following lines of code:
- import sys
- print(sys.version)
- It should print Python 3.0 ...
That's all. You're now working with Geany+Python 3.0
Thanks to NoBugs! from ubuntuforus




5 Responses to “Execute Python 3.0 files with Geany”
I don’t know how you installed Geany or what version of Ubuntu you are using, but I don’t have /usr/local/share/geany/
I have Ubuntu 8.10 Intrepid Ibex.
If you cannot find this file, do a search. CTRL+F and look for “filetypes.python” in all filesystem. You should be able to install it. Have you installed it with synaptics? Cause i have installed it from scratch (compiled it from source and then installed it).
It was located in /usr/share/geany/ and not the location you mentioned. I also compiled it myself. The one in the repos are just a release candidate.
I now get the following error when trying to Execute the file from Geany
python3.0: can’t open file ‘”filename.py”‘: [Errno 2] No such file or directory
Is there a version of mailman (I understand it is built on Python) or a mailman work-a-like that can be installed without root access?
Leave a comment