zoukankan      html  css  js  c++  java
  • Error importing tensorflow. Unless you are using bazel version `CXXABI_1.3.8' not found

    I have re-installed Anaconda2. And I got the following error when 'python -c 'import tensorflow''

    >>> import tensorflow
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "/home/gpu/anaconda2/lib/python2.7/site-packages/tensorflow/__init__.py", line 23, in <module>
    from tensorflow.python import *
    File "/home/gpu/anaconda2/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 60, in <module>
    raise ImportError(msg)
    ImportError: Traceback (most recent call last):
    File "/home/gpu/anaconda2/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 49, in <module>
    from tensorflow.python import pywrap_tensorflow
    File "/home/gpu/anaconda2/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in <module>
    _pywrap_tensorflow = swig_import_helper()
    File "/home/gpu/anaconda2/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)
    ImportError: /home/gpu/anaconda2/bin/../lib/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /home/gpu/anaconda2/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow.so)


    Error importing tensorflow. Unless you are using bazel,
    you should not try to import tensorflow from its source directory;
    please exit the tensorflow source tree, and relaunch your python interpreter
    from there.

    解决:

    I solved this problem by copying the libstdc++.so.6 file which contains version CXXABI_1.3.8.

    Try run the following search command first:

    $ strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep CXXABI_1.3.8

    If it returns CXXABI_1.3.8. Then you can do the copying.

    $ cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /home/jj/anaconda2/bin/../lib/libstdc++.so.6

  • 相关阅读:
    uva11235 FrequentValues (ST表)
    hdu5449 Robot Dog (树形dp+倍增lca)
    [BZOJ1637][Usaco2007 Mar]Balanced Lineup
    [BZOJ1688][Usaco2005 Open]Disease Manangement 疾病管理
    Luogu1119灾后重建
    [APIO2012]派遣
    [HNOI2004]宠物收养场
    [USACO14DEC] 驮运Piggy Back
    [USACO14JAN]滑雪等级Ski Course Rating
    [CODEVS3366] 矿石
  • 原文地址:https://www.cnblogs.com/whu-zeng/p/6401964.html
Copyright © 2011-2022 走看看