python 执行source 提示not found

解决办法:

source_cmd = 'source /etc/profile'
subprocess.run(source_cmd, shell=True, executable="/bin/bash", capture_output=True)
posted @ 2024-07-09 17:11  Tarzen  阅读(10)  评论(0编辑  收藏  举报