安装autopep8 pip install autopep8 mac下: brew install autopep8 autopep8 --in-place --aggressive --aggressive <filename>