![](/img/trans.png)
[英]Cannot install tensorflow on fresh ubuntu partition: tensorflow-0.8.0-cp34-cp34m-linux_x86_64.whl is not a supported wheel on this platform
[英]Cannot install Tensorflow on Ubuntu Linux
系統信息
MacBook Air M1
Ubuntu Linux 20.04 使用虛擬機
Python 3.8.5 64 位
我已經安裝了張量流,但在導入庫並編譯任何代碼后,它給了我以下一組錯誤
Traceback (most recent call last):
File "/home/mradulagrawal/Desktop/IP/image.py", line 2, in <module>
import tensorflow
File "/home/mradulagrawal/.local/lib/python3.8/site-packages/tensorflow/__init__.py", line 24, in <module>
from tensorflow.python import *
File "/home/mradulagrawal/.local/lib/python3.8/site-packages/tensorflow/python/__init__.py", line 72, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/home/mradulagrawal/.local/lib/python3.8/site-packages/tensorflow/python/__init__.py", line 61, in <module>
from tensorflow.python import pywrap_tensorflow
File "/home/mradulagrawal/.local/lib/python3.8/site-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in <module>
_pywrap_tensorflow = swig_import_helper()
File "/home/mradulagrawal/.local/lib/python3.8/site-packages/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)
File "/usr/lib/python3.8/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/usr/lib/python3.8/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: /home/mradulagrawal/.local/lib/python3.8/site-packages/tensorflow/python/_pywrap_tensorflow.so: invalid ELF header
Failed to load the native TensorFlow runtime.
See https://github.com/tensorflow/tensorflow/blob/master/tensorflow/g3doc/get_started/os_setup.md#import_error
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
mradulagrawal@ubuntu:~/Desktop$ /usr/bin/python3 /home/mradulagrawal/Desktop/IP/image.py
Traceback (most recent call last):
File "/home/mradulagrawal/.local/lib/python3.8/site-packages/tensorflow/python/__init__.py", line 61, in <module>
from tensorflow.python import pywrap_tensorflow
File "/home/mradulagrawal/.local/lib/python3.8/site-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in <module>
_pywrap_tensorflow = swig_import_helper()
File "/home/mradulagrawal/.local/lib/python3.8/site-packages/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)
File "/usr/lib/python3.8/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/usr/lib/python3.8/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: /home/mradulagrawal/.local/lib/python3.8/site-packages/tensorflow/python/_pywrap_tensorflow.so: invalid ELF header
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/mradulagrawal/Desktop/IP/image.py", line 2, in <module>
import tensorflow
File "/home/mradulagrawal/.local/lib/python3.8/site-packages/tensorflow/__init__.py", line 24, in <module>
from tensorflow.python import *
File "/home/mradulagrawal/.local/lib/python3.8/site-packages/tensorflow/python/__init__.py", line 72, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/home/mradulagrawal/.local/lib/python3.8/site-packages/tensorflow/python/__init__.py", line 61, in <module>
from tensorflow.python import pywrap_tensorflow
File "/home/mradulagrawal/.local/lib/python3.8/site-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in <module>
_pywrap_tensorflow = swig_import_helper()
File "/home/mradulagrawal/.local/lib/python3.8/site-packages/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)
File "/usr/lib/python3.8/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/usr/lib/python3.8/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: /home/mradulagrawal/.local/lib/python3.8/site-packages/tensorflow/python/_pywrap_tensorflow.so: invalid ELF header
Failed to load the native TensorFlow runtime.
See https://github.com/tensorflow/tensorflow/blob/master/tensorflow/g3doc/get_started/os_setup.md#import_error
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
謝謝你!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.