我正在为烧瓶应用程序在linux虚拟主机中设置tensorflow。我已经安装了tensorflow,但是当我导入它时出现以下错误 我试图升级GLIBC,但仍然无法正常工作。 我有python 3.5.7,我无法升级它,因为我在虚拟主机中 /lib64/libc.so.6: version `GLIBC_2.14' not found. Why am I getting this error?中的所有解决方案 没有工作。
Traceback (most recent call last):
File "/home/malnetxy/virtualenv/Server/3.5/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/malnetxy/virtualenv/Server/3.5/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/home/malnetxy/virtualenv/Server/3.5/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "/home/malnetxy/virtualenv/Server/3.5/lib64/python3.5/imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "/home/malnetxy/virtualenv/Server/3.5/lib64/python3.5/imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: /lib64/libc.so.6: version `GLIBC_2.15' not found (required by /home/malnetxy/virtualenv/Server/3.5/lib/python3.5/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/malnetxy/virtualenv/Server/3.5/lib/python3.5/site-packages/tensorflow/__init__.py", line 28, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "/home/malnetxy/virtualenv/Server/3.5/lib/python3.5/site-packages/tensorflow/python/__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "/home/malnetxy/virtualenv/Server/3.5/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/home/malnetxy/virtualenv/Server/3.5/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/malnetxy/virtualenv/Server/3.5/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/home/malnetxy/virtualenv/Server/3.5/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "/home/malnetxy/virtualenv/Server/3.5/lib64/python3.5/imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "/home/malnetxy/virtualenv/Server/3.5/lib64/python3.5/imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: /lib64/libc.so.6: version `GLIBC_2.15' not found (required by /home/malnetxy/virtualenv/Server/3.5/lib/python3.5/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so)
Failed to load the native TensorFlow runtime.
答案 0 :(得分:0)
我建议使用Anaconda环境。然后,您将能够安装Tensorflow和所需的一切,还可以执行glibc:conda install -c asmeurer glibc