1. 设置的路径是File->settings->Editor->File and Code Templates->Python Script内容见图:这里说明下#!

Pycharm 设置默认头的图文教程