Geany是一款简单的编辑器,支持多种编程语言
要安装Geany,Ubuntu14以上的用户需要在终端输入以下命令
sudo add-apt-repository ppa:geany-dev/ppa
sudo apt-get update
sudo apt-get install geany
如果你的Ubuntu安装了多个python版本,需要在Geany中进行配置
要检查python版本,可以在终端输入
python --version
首先打开安装好的Geany,新建一个文件,输入print("Hellow")
按ctrl+s
保存,文件名设定为hellow.py(一定要写后缀py)
保存后选择菜单Bulid-> set bulid command (汉化是生成-> 生成设置命令)
将Compile中修改成python3 -m py_compile "%f"
将Execute中修改成python3 "%f"
保存修改
选择Execute或者按下F5,可以看到python3正常编译
如果系统中缺少numpy或matplotlib,请参照下链接安装numpy及matplotlib