首页 > 解决方案 > 如何安装最新版本的 tensorflow?

问题描述

我想在我的机器上安装最新版本的 tensorflow (1.12.0) 并使用pip install tensorflow. 1.12.0 版本的 tensorflow 安装在我的 linux 机器上,没有任何错误,但是当我尝试在我的 python shell 中导入 tensorflow 时,它给出了这个错误并中止了 tensorflow 导入。

>>> import tensorflow as tf
F tensorflow/core/platform/cpu_feature_guard.cc:37] The TensorFlow library was compiled to use AVX instructions, but these aren't available on your machine. 
Aborted

在这个答案中,据说它是一个简单的警告,但我的不是警告,它完全中止了 tensorflow 的导入。我尝试多次卸载并重新安装 tensorflow,但同样的问题仍然存在。然后我尝试安装最低版本的 tensorflowpip install tensorflow==1.0.0并且能够安装旧版本的 tensorflow。

如何安装最新版本的 tensorflow?

标签: pythonlinuxtensorflowinstallation

解决方案


看来您的 CPU 不支持 AVX 指令。

由于 1.6 版使用 AVX 指令,因此 TF 不能在“旧”CPU 上使用。

但是有一些非官方的。但是你可能不会发现基于最新版本的 tensorflow。

这是一个关于它的线程:https ://github.com/tensorflow/tensorflow/issues/18689


推荐阅读