TensorFlow2.0 出现错误 AttributeError: module ‘tensorflow’ has no attribute ‘python_io’ tf.python_io 解决办法 1.把TensorFlow2.0版本改为原来的1.xx版本,例如改为TensorFlow 1.12.0 2.TensorFlow 2.0 中使用 Python_io 暂时使用如下指令: tf.compat.v1.python_io.TFRecordWriter(filename)