当前位置: 移动技术网 > IT编程>脚本编程>Python > 写python的文本编辑器Geany无法执行,显示“进程失败”

写python的文本编辑器Geany无法执行,显示“进程失败”

2020年07月30日  | 移动技术网IT编程  | 我要评论

1、执行简单的 print(“hello world”)后,编译显示“进程失败”,那么是Geany还没配置好。在Geany菜单栏中:生成-设置生成命令,界面如下:
在这里插入图片描述
(1)找到python.exe的路径,可以通过系统的环境变量查看,具体详见:
https://jingyan.baidu.com/article/e3c78d648fd32e3c4c85f587.html(转载)
在环境变量中查看
(2)找到路径C:\Users\Double E 35\AppData\Local\Programs\Python\Python38\python(我的安装路径)
然后在Geany的设置生成命令中的Compile填入"C:\Users\Double E 35\AppData\Local\Programs\Python\Python38\python" -m py_compile “%f” 记住 路径要加双引号!!!,也要注意空格;
在Execute中同样地填入"C:\Users\Double E 35\AppData\Local\Programs\Python\Python38\python" “%f”( “%f”前面有空格)
2、编译后是这样的:
在这里插入图片描述
通过“执行”可以查看在系统中执行python
在这里插入图片描述
执行成功

本文地址:https://blog.csdn.net/lyx4949/article/details/107671021

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网