AttributeError:模块"tensorflow.python.pywrap_tensorflow"没有属性"TFE_Py_RegisterExceptionClass" [英] AttributeError: module 'tensorflow.python.pywrap_tensorflow' has no attribute 'TFE_Py_RegisterExceptionClass'

查看:1763
本文介绍了AttributeError:模块"tensorflow.python.pywrap_tensorflow"没有属性"TFE_Py_RegisterExceptionClass"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从tensorflow时间序列contrib运行示例代码,但出现此错误.

I'm trying to run a example code from tensorflow timeseries contrib, but i'm getting this error.

AttributeError: module 'tensorflow.python.pywrap_tensorflow' has no attribute 'TFE_Py_RegisterExceptionClass'

我正在使用Anaconda.当前环境是Python 3.5和tensorflow 1.2.1.还尝试了tf 1.3,但没有任何变化.

I'm using Anaconda. Current environment is Python 3.5 and tensorflow 1.2.1. Also tried tf 1.3, but nothing changed.

这是我正在尝试运行的代码: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/timeseries/examples/predict.py

Here is the code im trying to run: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/timeseries/examples/predict.py

我在Google上找不到有关此问题的任何信息.

I cannot find anything about this problem on google.

我正在尝试开发一些时间序列预测,并且我想使用最新的可用资源.谢谢.

I am trying to develop some time series sequence prediction, and i would like to use the last resources available. Thanks.

推荐答案

如Conan.Net所写:

As Conan.Net wrote:

我试图从Anaconda中删除/清理某些环境并安装 一切都重新开始了,这一次.

I tried to remove/clean some environments from anaconda and install all again and it work this time.

此解决方案也对我有用,因此虽然不理想,但可以解决问题.如果您使用的是anaconda,则可能会在安装某些软件包然后删除它们(例如tensorflow与tensorflow-gpu)时发生,从而导致某些依赖项挂起.就我而言,我使用了:

This solution worked for me as well, so though not ideal, it will solve the problem. If you are using anaconda, it might happen when installing some packages and then removing them (e.g. tensorflow vs tensorflow-gpu) leaves some dependencies hanging. In my case, I used:

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),我需要它.

pip currently installs a later(1.4) than anaconda(1.3) version and I had need for it.

这篇关于AttributeError:模块"tensorflow.python.pywrap_tensorflow"没有属性"TFE_Py_RegisterExceptionClass"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆