使用python运行项目,出现错误:
AttributeError: module ‘tensorflow’ has no attribute 'placeholder’
错误原因:
tensorflow版本高于项目中所需的版本
解决方法:
- 查看tensorflow版本(教程)
- 卸载高版本的tensorflow
pip uninstall tensorflow
- 安装所需版本的tensorflow
pip install tensorflow==1.15.4
AttributeError: module ‘tensorflow’ has no attribute 'placeholder’
错误原因:
tensorflow版本高于项目中所需的版本
解决方法:
pip uninstall tensorflow
pip install tensorflow==1.15.4