Installation of Tensorflow on aarch64: Error: Could not find a version that satisfies the requirement tensorflow
Installation of Tensorflow on aarch64: Error: Could not find a version that satisfies the requirement tensorflow
我想在 aarch64 上安装 Tensorflow(Ubuntu 16.04;Linux 在 DeX 上)。
尝试 1: 遵循与经典 x86_64 架构相同的程序(在那里工作);见 here
sudo apt update
sudo apt install python3-dev python3-pip virtualenv # the latter was required under aarch64, not under x86_64
sudo -H pip3 install --upgrade virtualenv
mkdir /usr/local/tensorflow
virtualenv --system-site-packages -p python3 /usr/local/tensorflow
source /usr/local/tensorflow/bin/activate
pip3 install --upgrade tensorflow # fails with 'Error: Could not find a version that satisfies the requirement tensorflow (from versions: none)' and 'Error: No matching distribution found for tensorflow'
尝试 1 的相关帖子,但 Windows 是 。还可以找到其他帖子(类似标题),但 none 似乎是针对 ARM 体系结构的。
尝试 2: 关注 these instructions
sudo apt update
sudo apt install python3-dev python3-pip
mkdir /usr/local/tensorflow
cd /usr/local/tensorflow
wget https://github.com/lhelontra/tensorflow-on-arm/releases/download/v1.8.0/tensorflow-1.8.0-cp35-none-linux_aarch64.whl
sudo -H pip3 install tensorflow-1.8.0-cp35-none-linux_aarch64.whl
# => reports 'Failed building wheel for ...'. Still seems to somehow progress
# but then 'import tensorflow as tf' in a Python 3.5.2 session produces a lot
# of traceback output and essentially shows that the installation did not work.
在第三次尝试中,我试图跟随 these instructions 但是
无法安装 Bazel,因为 here 中的第 2 步失败,因为没有 aarch64 版本(即使下载了 .tar.gz,编译失败 ERROR: Must specify PROTOC if not bootstrapping from the distribution artifact
...
更多信息:python --version
显示 2.7.12
,python3 --version
显示 3.5.2
更新
我尝试了 hoefling
对尝试 1 的建议。运行 pip3 install tensorflow --extra-index-url=https://www.piwheels.org/simple
就在 pip3 install --upgrade tensorflow
使后者工作没有明显错误之前,但是开始 python3
并使用 import tensorflow as tf
我仍然获得大量回溯输出:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "/usr/lib/python3.5/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/usr/lib/python3.5/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: /usr/lib/aarch64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /usr/local/lib/python3.5/dist-packages/tensorflow/python/_pywrap_tensorflow_internal.so)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.5/dist-packages/tensorflow/__init__.py", line 24, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "/usr/lib/python3.5/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/usr/lib/python3.5/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: /usr/lib/aarch64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /usr/local/lib/python3.5/dist-packages/tensorflow/python/_pywrap_tensorflow_internal.so)
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/install_sources#common_installation_problems
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
我在 https://github.com/lhelontra/tensorflow-on-arm/issues/13
上发现了这个问题。简而言之,我错过了 aarch64
下的某些预赛。这是解决方案:
# Preliminaries
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install gcc-4.9
sudo apt install --only-upgrade libstdc++6
# Installation similar to Ubuntu on x86_64
sudo apt update
sudo apt install python3-dev python3-pip virtualenv
sudo -H pip3 install --upgrade virtualenv
mkdir /usr/local/tensorflow
virtualenv --system-site-packages -p python3 /usr/local/tensorflow/
source /usr/local/tensorflow/bin/activate
pip3 install --upgrade tensorflow
deactivate
# Test
source /usr/local/tensorflow/bin/activate
$ python3
>>> import tensorflow as tf
>>> hello = tf.constant("Hello, World!")
>>> sess = tf.Session()
>>> print(sess.run(hello))
大家好,我下载安装后 CPU 解决了上述导入张量流错误
Microsoft Visual C++ 2015-2019 可再发行 (x64)
VC_redist.x64 版本在我的笔记本电脑上..希望这对那里的人有帮助。
我最初安装的是 Anaconda 3.7 python 版本,然后我现在使用 conda 命令提示符
从 Anaconda 成功安装了张量流,它工作正常。但是在导入 tensorflow 时我 运行 遇到了上述问题。
我什至安装了 msv140dll,但在我下载并 运行 之前它仍然无法工作
VC_redist.x64 版本。之后一切正常
我想在 aarch64 上安装 Tensorflow(Ubuntu 16.04;Linux 在 DeX 上)。
尝试 1: 遵循与经典 x86_64 架构相同的程序(在那里工作);见 here
sudo apt update
sudo apt install python3-dev python3-pip virtualenv # the latter was required under aarch64, not under x86_64
sudo -H pip3 install --upgrade virtualenv
mkdir /usr/local/tensorflow
virtualenv --system-site-packages -p python3 /usr/local/tensorflow
source /usr/local/tensorflow/bin/activate
pip3 install --upgrade tensorflow # fails with 'Error: Could not find a version that satisfies the requirement tensorflow (from versions: none)' and 'Error: No matching distribution found for tensorflow'
尝试 1 的相关帖子,但 Windows 是
尝试 2: 关注 these instructions
sudo apt update
sudo apt install python3-dev python3-pip
mkdir /usr/local/tensorflow
cd /usr/local/tensorflow
wget https://github.com/lhelontra/tensorflow-on-arm/releases/download/v1.8.0/tensorflow-1.8.0-cp35-none-linux_aarch64.whl
sudo -H pip3 install tensorflow-1.8.0-cp35-none-linux_aarch64.whl
# => reports 'Failed building wheel for ...'. Still seems to somehow progress
# but then 'import tensorflow as tf' in a Python 3.5.2 session produces a lot
# of traceback output and essentially shows that the installation did not work.
在第三次尝试中,我试图跟随 these instructions 但是
无法安装 Bazel,因为 here 中的第 2 步失败,因为没有 aarch64 版本(即使下载了 .tar.gz,编译失败 ERROR: Must specify PROTOC if not bootstrapping from the distribution artifact
...
更多信息:python --version
显示 2.7.12
,python3 --version
显示 3.5.2
更新
我尝试了 hoefling
对尝试 1 的建议。运行 pip3 install tensorflow --extra-index-url=https://www.piwheels.org/simple
就在 pip3 install --upgrade tensorflow
使后者工作没有明显错误之前,但是开始 python3
并使用 import tensorflow as tf
我仍然获得大量回溯输出:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "/usr/lib/python3.5/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/usr/lib/python3.5/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: /usr/lib/aarch64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /usr/local/lib/python3.5/dist-packages/tensorflow/python/_pywrap_tensorflow_internal.so)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.5/dist-packages/tensorflow/__init__.py", line 24, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "/usr/lib/python3.5/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/usr/lib/python3.5/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: /usr/lib/aarch64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /usr/local/lib/python3.5/dist-packages/tensorflow/python/_pywrap_tensorflow_internal.so)
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/install_sources#common_installation_problems
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
我在 https://github.com/lhelontra/tensorflow-on-arm/issues/13
上发现了这个问题。简而言之,我错过了 aarch64
下的某些预赛。这是解决方案:
# Preliminaries
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install gcc-4.9
sudo apt install --only-upgrade libstdc++6
# Installation similar to Ubuntu on x86_64
sudo apt update
sudo apt install python3-dev python3-pip virtualenv
sudo -H pip3 install --upgrade virtualenv
mkdir /usr/local/tensorflow
virtualenv --system-site-packages -p python3 /usr/local/tensorflow/
source /usr/local/tensorflow/bin/activate
pip3 install --upgrade tensorflow
deactivate
# Test
source /usr/local/tensorflow/bin/activate
$ python3
>>> import tensorflow as tf
>>> hello = tf.constant("Hello, World!")
>>> sess = tf.Session()
>>> print(sess.run(hello))
大家好,我下载安装后 CPU 解决了上述导入张量流错误 Microsoft Visual C++ 2015-2019 可再发行 (x64) VC_redist.x64 版本在我的笔记本电脑上..希望这对那里的人有帮助。
我最初安装的是 Anaconda 3.7 python 版本,然后我现在使用 conda 命令提示符
从 Anaconda 成功安装了张量流,它工作正常。但是在导入 tensorflow 时我 运行 遇到了上述问题。
我什至安装了 msv140dll,但在我下载并 运行 之前它仍然无法工作
VC_redist.x64 版本。之后一切正常