AttributeError: module 'tensorflow.python.training.checkpointable'

在運行import tensorflow as tf時出現:

python已停止工作

經過檢查認爲是tensorflow庫安裝出現問題,卸載tensorflow庫重新安裝

卸載tensorflow

重新安裝tensorflow後,運行出現:AttributeError: module ‘tensorflow.python.training.checkpointable’

查閱資料,大多認爲原因是:
升級或者安裝 tensorflow 時,沒有將老版本卸乾淨。
需要確保:import tensorflow 失敗
然後再重新安裝 tensorflow

然而卸載重裝後沒有解決

後面認爲是由於版本問題導致,採用下面安裝命令解決:
pip install tensorflow-gpu==1.2.1 -i https://pypi.tuna.tsinghua.edu.cn/simple

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章