运行时出现 module ‘tensorflow’ has no attribute 'ConfigProto'

昨天运行时出现module ‘tensorflow’ has no attribute ‘ConfigProto’,百度了一番,试了好多种方法都没有解决这个问题。后来我突然想到是不是版本的问题,发现网上没有人提出这个问题过,只能自己去官网看API,发现果然是这样
运行时出现 module ‘tensorflow’ has no attribute 'ConfigProto'
下面是2.0版本下,搜索ConfigProto,没有结果
运行时出现 module ‘tensorflow’ has no attribute 'ConfigProto'
接着我换成了1.15
运行时出现 module ‘tensorflow’ has no attribute 'ConfigProto'
之后我将现有版本的tensorflow卸载,安装上对应版本的,问题得到解决。