请问这个是什么问题

深度学习

#1

AttributeError: module ‘tensorflow.python._pywrap_tensorflow_internal’ has no attribute ‘TFE_NewContextOptions’


#2

贴一下代码?只看这个看不出问题


#3

使用的tf版本和环境是什么?参考一下这个错误:https://stackoverflow.com/questions/46010571/attributeerror-module-tensorflow-python-pywrap-tensorflow-has-no-attribute-t


#4

就是import keras的时候出错的,是我keras没安好吗?


#5

就是import keras的时候出现这个错误的,是我keras没安装好吗?


#6

win10系统,tf是1.4.0的 然后发现import tensorflow as tf也报错这个错了,之前都是没有问题的


#7

你重新装个keras最新版的试试?


#8

我查了查网上的回答,你看看有没有用。 :grin:

网友回答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.

网友回答2:

Ok I finally managed to resolve the issue.

2 issues at work here. One being my Visual Studio was not installed properly, and the second one (outside of this topic but still interesting) is that my laptop has dual graphics boot-up.

So for the first issue, I managed to resolve it by deleting most folders and restarting the installation, starting from visual studio (the free version of community VS2017 did not work previously).

Then as for the second issue, I only need to remove intel graphics from the bootup menu and solely use the K610M that I am having and everything is fine now, except for a list of warning messages that seems to be common in most cases.

Thanks for the help again. Much appreciated.


#9

嗯嗯,我重新装了tensorflow解决了


#10

您好,我把tf从1.3升级到1.7出现了同样的问题,只能装1.4才能避免这个问题吗?谢谢!