Skip to main content
 首页 » 编程设计

python之属性错误 : module '_pywrap_tensorflow_internal' has no attribute 'TFE_DEVICE_PLACEMENT_EXPLICIT_swigconstant'

2024年12月31日25www_RR

我正在使用 Python 3.5 64 位、Cuda 9.2、TensorFlow 1.11、Keras 2.2.4

我收到这个错误:

AttributeError: module '_pywrap_tensorflow_internal' has no attribute 'TFE_DEVICE_PLACEMENT_EXPLICIT_swigconstant'

卸载并重新安装 TensorFlow 停止了 import tensorflow 的消息,但是 import keras 的问题仍然存在。

我看到 dumpbin.exe 对某些人很有用,但我一直无法让它工作。

今天早上在尝试让 Tensor Board 工作时出现了问题。我正在用 pip 更新 python 模块,但我不确定是什么引起的。

请您参考如下方法:

我遇到了同样的问题,这已经得到解答here .按照以下步骤解决此问题。也可以引用here查看解决方案。