我尝试了我的Ubuntu 12.04 LTS系统上的TensorFlow的Anaconda installation,但是在Python中导入库时,我遇到下面显示的ImportError。无法在Ubuntu 12.04 LTS上正确安装或加载Tensorflow并导致ImportError
我经历了一个solution为类似的线程给出,但它并没有为我工作。
基本上这里就是我所做的安装:
$ conda create -n tensorflow python=2.7
$ source activate tensorflow
(tensorflow)$ conda install -c conda-forge tensorflow
(tensorflow)$ source deactivate
$ source activate tensorflow
然后从virtualenv中内我装的Python,并试图导入tensorflow。我得到的是以下错误:
>>> import tensorflow
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/anirudh/anaconda/envs/tensorflow/lib/python2.7/site-packages/tensorflow/__init__.py", line 23, in <module>
from tensorflow.python import *
File "/home/anirudh/anaconda/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 48, in <module>
from tensorflow.python import pywrap_tensorflow
File "/home/anirudh/anaconda/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in <module>
_pywrap_tensorflow = swig_import_helper()
File "/home/anirudh/anaconda/envs/tensorflow/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: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.19' not found (required by /home/anirudh/anaconda/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow.so)
如何对此进行排序?
为什么你要坚持四年的OS版本? –
恰巧我的电脑硬件不兼容软件升级。升级会导致图形驱动程序在重新启动时失败。我有一台戴尔Vostro 3445笔记本。 – Anirudh
很抱歉听到这个消息。 –