安装tensorflow时出错

时间:2017-07-21 13:37:17

标签: tensorflow

我正在尝试在我没有sudo访问权限的群集上安装tensorflow,但我收到此错误:

  

追踪(最近一次通话):     文件" /home/nsoufi2s/anaconda3/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py" ;,第41行,在       来自tensorflow.python.pywrap_tensorflow_internal import *     文件" /home/nsoufi2s/anaconda3/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow_internal.py" ;,第28行,在       _pywrap_tensorflow_internal = swig_import_helper()     文件" /home/nsoufi2s/anaconda3/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow_internal.py" ;,第24行,swig_import_helper       _mod = imp.load_module(' _pywrap_tensorflow_internal',fp,pathname,description)     文件" /home/nsoufi2s/anaconda3/lib/python3.5/imp.py" ;,第242行,在load_module中       return load_dynamic(name,filename,file)     文件" /home/nsoufi2s/anaconda3/lib/python3.5/imp.py",第342行,在load_dynamic中       return _load(spec)   ImportError:/lib64/libc.so.6:版本`GLIBC_2.14'未找到(/home/nsoufi2s/anaconda3/lib/python3.5/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so所需)

在处理上述异常期间,发生了另一个异常:

  

追踪(最近一次通话):     文件"",第1行,in     文件" /home/nsoufi2s/anaconda3/lib/python3.5/site-packages/tensorflow/ init .py",第24行,在       来自tensorflow.python import *     文件" /home/nsoufi2s/anaconda3/lib/python3.5/site-packages/tensorflow/python/ init .py",第49行,in       来自tensorflow.python导入pywrap_tensorflow     文件" /home/nsoufi2s/anaconda3/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py" ;,第52行,在       引发ImportError(msg)   ImportError:Traceback(最近一次调用最后一次):     文件" /home/nsoufi2s/anaconda3/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py" ;,第41行,在       来自tensorflow.python.pywrap_tensorflow_internal import *     文件" /home/nsoufi2s/anaconda3/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow_internal.py" ;,第28行,在       _pywrap_tensorflow_internal = swig_import_helper()     文件" /home/nsoufi2s/anaconda3/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow_internal.py" ;,第24行,swig_import_helper       _mod = imp.load_module(' _pywrap_tensorflow_internal',fp,pathname,description)     文件" /home/nsoufi2s/anaconda3/lib/python3.5/imp.py" ;,第242行,在load_module中       return load_dynamic(name,filename,file)     文件" /home/nsoufi2s/anaconda3/lib/python3.5/imp.py",第342行,在load_dynamic中       return _load(spec)   ImportError:/lib64/libc.so.6:版本`GLIBC_2.14'未找到(/home/nsoufi2s/anaconda3/lib/python3.5/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so所需)

无法加载本机TensorFlow运行时。

2 个答案:

答案 0 :(得分:4)

您可以使用以下命令在主目录中创建虚拟环境。你不需要sudo访问。

conda create -n tensorflow python=3.5
source activate tensorflow
pip install tensorflow

答案 1 :(得分:1)

conda install tensorflow有效