IOError 和 FileNotFoundError的关系 先说结论: FileNotFoundError 属于 IOError的一种 在Python2.x 和 Python3.x 中open不存在的文件,会出现不同的报错信息: Python 2.7.10 (default, Oct 6 2017, 22:29:07) >>> with open(