AttributeError: module ‘tensorflow.python._pywrap_tensorflow_internal’ has no attribute ‘TFE_NewContextOptions’
win10系统，tf是1.4.0的 然后发现import tensorflow as tf也报错这个错了，之前都是没有问题的
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
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.
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.