总结

这场表演邀请了三位角色:run.shmain.pypath.sh,拍摄场地选在了 Windows -> Git Bash
群演1号 run.sh
#!/usr/bin bash
. ./path.sh || exit -1

# demo.py无法直接找到是因为 $PATH中已经没有 工作目录
python demo.py
群演2号 path.sh
export PYTHONPATH=$PWD/define_module
export PATH="/d/Anaconda"
#export PATH="/d/Anaconda":$PWD
群演3号 demo.py
#coding=utf-8

import sys
# sys.path.append("/d/Anaconda/envs/py39/Lib/site-package/torch")

# print(sys.version, sys.path)
if __name__ == "__main__":
    print('demo')

https://jarvisma.gitbook.io/pythonlearn/5.4-python-mo-kuai-hua/chapter5.4.2
https://blog.csdn.net/qq_38156052/article/details/81130117
https://blog.csdn.net/qq_27825451/article/details/100552739
https://blog.csdn.net/NeverLate_gogogo/article/details/107615838
http://www.coolpython.net/python_senior/module_concept/modify-sys-path.html