文章目录 方法一 1. 配置 rc.local 的输出log 2. python的解释器配置 3. 引入 pip或者 pip3 下载的第三方的包 方法二 1. 使用shell脚本 运行python的脚本 2. 在profile文件上执行 方法一 1. 配置 rc.local 的输出log #!/bin/sh -x exec 1>/tmp/rc.local.log 2>&1 # send stdout and stderr from rc.local to a log file set -x # tell sh to display commands before execution tmp/rc.local.log log文件位置路径 查看log文件,一般就能知道直接俄的python脚本为什么不能运行了。 2. python的解释器配置 # main 待