Traceback(最近一次调用最后一次):
文件"/usr/local/lib/python3.4/dist-packages/tensorflow/python/init.py",第61行,in
来自tensorflow.python导入pywrap_tensorflow
文件"/usr/local/lib/python3.4/dist-packages/tensorflow/python/pywrap_tensorflow.py",第28行,in
_pywrap_tensorflow = swig_import_helper()
swig_import_helper中的文件"/usr/local/lib/python3.4/dist-packages/tensorflow/python/pywrap_tensorflow.py",第24行
_mod = imp.load_module('_ pywrap_tensorflow',fp,pathname,description)
在load_module中输入文件"/usr/lib/python3.4/imp.py",第243行
return load_dynamic(name,filename,file)
ImportError:/opt/Xilinx/Vivado/2015.1/lib/lnx64.o/libstdc++.so.6:找不到版本`GLIBCXX_3.4.19'(/usr/local/lib/python3.4/dist-packages/tensorflow需要) /python/_pywrap_tensorflow.so)
在处理上述异常期间,发生了另一个异常:
Traceback(最近一次调用最后一次):
文件"image_resize.py",第10行,in
导入张量流为tf
文件"/usr/local/lib/python3.4/dist-packages/tensorflow/init.py",第24行,in
来自tensorflow.python import *
文件"/usr/local/lib/python3.4/dist-packages/tensorflow/python/init.py",第72行,in
引发ImportError(msg)
ImportError:Traceback(最近一次调用最后一次):
文件"/usr/local/lib/python3.4/dist-packages/tensorflow/python/init.py",第61行,in
来自tensorflow.python导入pywrap_tensorflow
文件"/usr/local/lib/python3.4/dist-packages/tensorflow/python/pywrap_tensorflow.py",第28行,in
_pywrap_tensorflow = swig_import_helper()
swig_import_helper中的文件"/usr/local/lib/python3.4/dist-packages/tensorflow/python/pywrap_tensorflow.py",第24行
_mod = imp.load_module('_ pywrap_tensorflow',fp,pathname,description)
在load_module中输入文件"/usr/lib/python3.4/imp.py",第243行
return load_dynamic(name,filename,file)
ImportError:/opt/Xilinx/Vivado/2015.1/lib/lnx64.o/libstdc++.so.6:找不到版本`GLIBCXX_3.4.19'(/usr/local/lib/python3.4/dist-packages/tensorflow需要) /python/_pywrap_tensorflow.so)
无法加载本机TensorFlow运行时。
请参阅https://github.com/tensorflow/tensorflow/blob/master/tensorflow/g3doc/get_started/os_setup.md#import_error
出于一些常见原因和解决方案。包括整个堆栈跟踪
请求帮助时,请在此错误消息上方。
我正在使用ubuntu 14.4
和python版本3.4
你是如何安装TensorFlow的? 对于Linux和Python 3.4,您可能需要尝试:tensorflow.org/install/install_linux#python_34
感谢您的回复。
我试过你的链接。 我得到同样的错误@Neal
看起来您安装了Xilinx,其中包含旧版本的libstdc ++。 如果从LD_LIBRARY_PATH中删除它,那应该可以解决问题。
我正在使用带有python 3.5的Ubuntu 14.4。 我运行以下和python3 shell导入tensorflow非常好。
sudo -H pip3 install tensorflow