我在Linux上使用什么来使python程序可执行 [英] What do I use on linux to make a python program executable

查看:482
本文介绍了我在Linux上使用什么来使python程序可执行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚安装了linux系统(Kubuntu),并且想知道是否存在使python程序对于linux可执行的程序.

I just installed a linux system (Kubuntu) and was wondering if there is a program to make python programs executable for linux.

推荐答案

只需将其放在脚本的第一行:

Just put this in the first line of your script :

#!/usr/bin/env python

使用以下命令使文件可执行

Make the file executable with

chmod +x myfile.py

执行

./myfile.py

这篇关于我在Linux上使用什么来使python程序可执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆