问题
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'
I'm using Anaconda. Current environment is Python 3.5 and tensorflow 1.2.1. Also tried tf 1.3, but nothing changed.
Here is the code im trying to run: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/timeseries/examples/predict.py
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.
回答1:
As Conan.Net wrote:
I tried to remove/clean some environments from anaconda and install all again and it work this time.
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
then
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 currently installs a later(1.4) than anaconda(1.3) version and I had need for it.
来源:https://stackoverflow.com/questions/46010571/attributeerror-module-tensorflow-python-pywrap-tensorflow-has-no-attribute-t