我嘗試了我的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
很抱歉聽到這個消息。 –