TensorFlow库已编译为使用SSE4.1指令,但这些指令在您的计算机上不可用。中止(核心倾倒)

问题描述 投票:5回答:3

我已经按照https://www.tensorflow.org/install/pip步骤安装了tensorflow。我是通过Anaconda安装的。

我也尝试使用虚拟环境而不使用anaconda,因为这个页面提供了(请检查图像)。它也给出了同样的错误。

enter image description here

以下图像显示了我安装的版本及其给定的错误。

我在用,

  • Ubuntu 18.04.1 LTS
  • x86_64的
  • 处理器:Intel(R)Core(TM)2 Duo CPU T5870 @ 2.00 GHz 2.00 GHz
  • 已安装的内存(RAM):2.00 GB

enter image description here

版本:enter image description here

错误:enter image description here

我试图克服这个问题,但我找不到解决办法。我是tensorflow的新手,并试图安装和学习它。请帮我解决这个问题。

python tensorflow
3个回答
6
投票

您的CPU太旧,无法运行TensorFlow,因为它缺少必需的指令集。 Starting with TensorFlow 1.6, binaries use AVX instructions which may not run on older CPUs. - 根据Tensorflow。

您有两种可能的解决方案:

  1. 使用基于云/网络的解决方案,例如谷歌Colab
  2. 将您的机器升级到现代版本

11
投票

谢谢你早先的答案。我正面临着SSE4.2指令的确切问题。我安装了tensorflow 1.5而不是1.12,它正在工作。

我系统上的错误消息

The TensorFlow library was compiled to use SSE4.2 instructions, but these aren't available on your machine.
Aborted (core dumped)

这是我做的:

请在虚拟环境中运行:

pip uninstall tensorflow

pip install tensorflow==1.5

您可以将1.5替换为适合您机器的任何版本。

尝试再次导入它应该立即运行


0
投票

笔记本电脑HP ProBook 4720s上出现同样的错误:

python3
Python 3.6.7 (default, Oct 22 2018, 11:32:17) 
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
2019-04-16 17:50:25.829023: 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 (core dumped)

但我通过Anaconda conda安装TensorFlow:

conda install tensorflow  # install TensorFlow for CPU
conda activate DL3  # activate virtual environment DL3

python
Python 3.7.3 (default, Mar 27 2019, 22:11:17) 
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> print(tf.__version__)
1.13.1
>>> exit()
© www.soinside.com 2019 - 2024. All rights reserved.