简体   繁体   中英

not able to import tensorflow inside anaconda python 2.7

First of all, I am an inexperienced with most things related to software engineer, so bear with me if the question is too simple.

On my windows desktop, I installed VMware. Inside the vmware, I installed Anaconda. then using the pip command I was able to install tensorflow.

However when I try to import it, the following error shows up

[cloudera@quickstart ~]$ python
Python 2.7.10 |Anaconda 2.4.0 (64-bit)| (default, Oct 19 2015, 18:04:42) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> import tensorflow
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/cloudera/anaconda2/lib/python2.7/site-packages/tensorflow/__init__.py", line 4, in <module>
    from tensorflow.python import *
  File "/home/cloudera/anaconda2/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 22, in <module>
    from tensorflow.python.client.client_lib import *
  File "/home/cloudera/anaconda2/lib/python2.7/site-packages/tensorflow/python/client/client_lib.py", line 35, in <module>
    from tensorflow.python.client.session import InteractiveSession
  File "/home/cloudera/anaconda2/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 11, in <module>
    from tensorflow.python import pywrap_tensorflow as tf_session
  File "/home/cloudera/anaconda2/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in <module>
    _pywrap_tensorflow = swig_import_helper()
  File "/home/cloudera/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: /lib64/libc.so.6: version `GLIBC_2.17' not found (required by /home/cloudera/anaconda2/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow.so)**

I can't find the GLIBC_2.17 anywhere, how can I fix this?

The TensorFlow binary packages require that the installed version of glibc (the GNU C Library) is at least 2.17. It looks like your VM has an old version of glibc , which is causing this error when you try to load TensorFlow.

Since you are using VMWare, can you try creating a VM with a Ubuntu 14.04 image? We have tested with this operating system, and it has the necessary libraries to run TensorFlow.

You can either ugprade your libc (see Error while importing Tensorflow in python2.7 in Ubuntu 12.04. 'GLIBC_2.17 not found' for example)

Or you could just build from source so that it uses your local version of libc. The latter is probably the easiest way to go. See http://tensorflow.org/get_started/os_setup.md#installing_from_sources

(When you configure, say no to using GPU to keep things simple)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM