shell脚本调用python模块
python helloworld.py代码为
# coding:utf-8
from __future__ import print_function
import sys
print(sys.path)
shell脚本run.sh为
#! /bin/bash
# 注意上面一行不是注释
PATH=/home/anaconda3/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
python -m helloworld
exit 0
执行sh run.sh就能运行.