NOTE likely not completely accurate (will update at some point – short on time atm.)
You will want to have a shell wrapper script that containts the following. Where
/path/to/script
is the path too your python script(s)
#!/usr/bin/env bash
export PYTHONPATH=$PYTHONPATH:/path/to/script
in the python script that wants to use a local python library put
import getopt, sys
sys.path.append("/folder/containing/local-python-lib")
neat way to parse and assign variables inside a shell script
while getopts 'p:o:' arg;
do
case $arg in
p)
OPTION="$OPTARG";;
o)
OUTPUT="$OPTARG";;
esac
done
shift $(($OPTIND-1))
# ...
#example usage: <script name> -p <option> -o <output name>