解决ImportError: cannot import name ‘np_utils’ from ‘tensorflow.keras.utils’ 在构建语料库词汇表时使用了from tensorflow.keras.utils import np_utils出现下列错误 解决方法 将导包的语句改成: from tensorflow.python.keras.utils import np_utils 错误解决!!