问题:import tensorflow报错AttributeError: module ‘google.protobuf.internal.api_implementation’ has no attribute ‘_c_module’
解决方法:
首先更新protobuf,即运行pip install -U protobuf
出现以下警告,表示tensorboardx包与protobuf版本不兼容(这里可能显示其他安装包也不兼容,进行后续相同处理即可)
对于不兼容的安装包,将其更新至最新版本,例如pip install -U tensorboardX,更新完毕后可正常import tensorflow