linux下tensorflow遇到新的问题

来源:互联网 发布:睡眠计时器软件 编辑:程序博客网 时间:2024/05/21 12:30

今天和往常一样打开python

import tensorflow时遇到莫名奇妙的问题

  class TreeBuilderForHtml5lib(html5lib.treebuilders._base.TreeBuilder):
AttributeError: 'module' object has no attribute '_base'

然后再import tensorflow又遇到

ImportError: cannot import name pywrap_tensorflow

这是什么个情况,tensorflow卸载再装还是遇到同样的问题

经过一上午的努力,发现这可能是 hemlocklib这里面的东西出了问题,下面是我的解决办法,可能不适用其他人


sudo pip install --upgrade beautifulsoup4sudo pip install --upgrade html5lib

然后在import tensorflow 问题就解决了