本文介绍了在Ubuntu 12.04中的Python 2.7中导入Tensorflow时出错. “未找到GLIBC_2.17"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经使用python成功安装了Tensorflow绑定.但是当我尝试导入Tensorflow时,出现以下错误.
I have installed the Tensorflow bindings with python successfully. But when I try to import Tensorflow, I get the follwoing error.
ImportError: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.17' not found (required by /usr/local/lib/python2.7/dist-packages/tensorflow/python/_pywrap_tensorflow.so)
我尝试将GLIBC_2.15更新为2.17,但是没有运气.
I have tried to update GLIBC_2.15 to 2.17, but no luck.
推荐答案
我遇到了同样的问题,因此在谷歌搜索中执行了以下步骤:
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
并退出:
$ deactivate
对我有用.
这篇关于在Ubuntu 12.04中的Python 2.7中导入Tensorflow时出错. “未找到GLIBC_2.17"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!