1
我第一次嘗試通過以下安裝tensorflow:無效ELF頭tensorflow
[email protected]:~/July 2016$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.9.0-cp27-none-linux_x86_64.whl
[email protected]:~/July 2016$ pip install --upgrade $TF_BINARY_URL
然後我試圖使用溶液(用於Linux和tensorflow 0.9.0稍作修改的版本)從iRapha here:
[email protected]:~/July 2016$ wget https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.9.0-cp27-none-linux_x86_64.whl
[email protected]:~/July 2016$ pip install tensorflow-0.9.0-cp27-none-linux_x86_64.whl
然後我試着測試張量流是否成功安裝。以下輸出顯示存在'無效的ELF標頭'錯誤。
[email protected]:~/July 2016$ python
Python 2.7.12 |Anaconda 2.5.0 (64-bit)| (default, Jul 2 2016, 17:42:40)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
>>> import tensorflow
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/export/mlrg/caugusta/anaconda2/lib/python2.7/site-packages /tensorflow/__init__.py", line 23, in <module>
from tensorflow.python import *
File "/export/mlrg/caugusta/anaconda2/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 48, in <module>
from tensorflow.python import pywrap_tensorflow
File "/export/mlrg/caugusta/anaconda2/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in <module>
_pywrap_tensorflow = swig_import_helper()
File "/export/mlrg/caugusta/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: /export/mlrg/caugusta/anaconda2/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow.so: invalid ELF header
我檢查了here。基於這個問題的答案,我想:
[email protected]:~July 2016$ pip install tensorflow
一切說tensorflow安裝成功,但是當我將其導入在Python,我得到的是無效的ELF頭錯誤。任何人都知道我可以解決這個問題
你確定tensorflow甚至可以用'pip'嗎?我無法用'pip search tensorflow'找到它。 –
這是一個潛在的問題,但我試着安裝三種不同的方法,並且所有的方式都表示tensorflow已經成功安裝。 – StatsSorceress
當前的答案是否迴應您的問題?你有沒有得到這個解決? – Pinocchio