Error While Importing Tensorflow in Python 2.7 in Ubuntu 12.04. 'Glibc_2.17 Not Found'

Error while importing Tensorflow in Python 2.7 in Ubuntu 12.04. 'GLIBC_2.17 not found'

I had the same problem, so googling I made these steps:

$ sudo pip install --upgrade virtualenv
$ virtualenv --system-site-packages ~/tensorflow
$ cd ~/tensorflow
$ source bin/activate
$ pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
$ cd /tmp
$ wget http://launchpadlibrarian.net/137699828/libc6_2.17-0ubuntu5_amd64.deb
$ wget http://launchpadlibrarian.net/137699829/libc6-dev_2.17-0ubuntu5_amd64.deb
$ mkdir libc6_2.17
$ cd libc6_2.17
$ ar p ../libc6_2.17-0ubuntu5_amd64.deb data.tar.gz | tar zx
$ ar p ../libc6-dev_2.17-0ubuntu5_amd64.deb data.tar.gz | tar zx
$ cd -
$ LD_LIBRARY_PATH=/tmp/libc6_2.17/lib/x86_64-linux-gnu/ /tmp/libc6_2.17/lib/x86_64-linux-gnu/ld-2.17.so bin/python local/lib/python2.7/site-packages/tensorflow/models/image/mnist/convolutional.py

And to exit:

$ deactivate 

That works for me.

Unable to properly install or load Tensorflow on Ubuntu 12.04 LTS with resultant ImportError

You need to install libstdc++6 with some dependencies like gcc an g++, at least gcc-4.6 version:

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.9 g++-4.9
sudo apt-get install libstdc++6

Or you can install linux-headers and build-essential witch contains some useful tools like gcc compiler, make .... tools for compiling and building software from source.

ERROR: Failed to load the native TensorFlow runtime in Python 2.7

You're missing some dependencies for running TensorFlow.

You can follow this tutorial to install TensorFlow from scratch.

Anyway, for your particular issue, you can just install libc6:

sudo apt-get update
sudo apt-get install libc6

Installing Tensorflow on centos 5

I have same problem.

But I used CentOS 6.5 and my GLIBC(GNU libc) version is 2.12.

I tried to changed my GLIBC version manually by removing version 2.12 and installing 2.17.

It occured many problems for it's dependencies and cannot import TensorFlow.

So, I used CentOS 7.0 and it has default GLIBC version 2.17.

I can install and run TensorFlow using CentOS 7.0 without any problem.

Thank you.



Related Topics



Leave a reply



Submit