在环境变量文件~/.bashrc中添加
export PYTHONDONTWRITEBYTECODE=False
source ~/.bashrc加载即可
find . -name '*.pyc' -delete