PyCharm显示行号有很多教程,但是随着版本更新,按钮的位置会发生改变,最新版本(2018.11.12)是Version 2018.2.4,找了半天终于看到了:
File-->Settings-->Editor-->General-->Appearance-->Show Line numbers