我正在尝试使用最新的可用资源来开发一些时间序列序列预测。为此,我确实检查了 TensorFlow 时间序列中的示例代码,但收到此错误:
AttributeError: module 'tensorflow.python.pywrap_tensorflow' has no attribute 'TFE_Py_RegisterExceptionClass'
我正在使用 Anaconda。当前环境是Python 3.5和TensorFlow 1.2.1。也尝试过 TensorFlow 1.3,但没有任何改变。
这里是the code I'm trying to run 。我在谷歌上没有找到与该问题相关的任何有用信息。有什么解决办法吗?
最佳答案
正如 Conan.Net 所写:
I tried to remove/clean some environments from anaconda and install all again and it work this time.
这个解决方案也对我有用,所以虽然不理想,但它可以解决问题。如果您使用 anaconda,则在安装某些软件包然后删除它们(例如,tensorflow 与 tensorflow-gpu)时可能会发生这种情况,从而导致某些依赖项悬而未决。就我而言,我使用了:
conda remove --name py2_tf_gpu --all
然后
conda create --name py2_tf_gpu python=2 anaconda pandas numpy scipy jupyter
source activate py2_tf_gpu
pip install --ignore-installed --upgrade tensorflow-gpu
pip 目前安装了比 anaconda(1.3) 更高的版本 (1.4),我需要它。
关于python - 属性错误: module 'tensorflow.python.pywrap_tensorflow' has no attribute 'TFE_Py_RegisterExceptionClass' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46010571/