先写第一个python文件 hello.py然后运行,当然目录一定切换到文件目录下print('hello world')
喔,NO,权限权限啊 好吧给hello.py添加权限localhost:Desktop liuxxx$ ./hello.py 然后输出如下 -bash: ./hello.py: Permission denied
localhost:Desktop liuxxx$ chmod a+x hello.py 然后执行 localhost:Desktop liuxxx$ ./hello.py 终于成功了输出如下 hello world
查看原文:https://www.liuandy.cn/python/2017/12/08/2024.html