我已经按照https://www.tensorflow.org/install/pip步骤安装了tensorflow。我是通过Anaconda安装的。
我也尝试使用虚拟环境而不使用anaconda,因为这个页面提供了(请检查图像)。它也给出了同样的错误。
以下图像显示了我安装的版本及其给定的错误。
我在用,
我试图克服这个问题,但我找不到解决办法。我是tensorflow的新手,并试图安装和学习它。请帮我解决这个问题。
您的CPU太旧,无法运行TensorFlow,因为它缺少必需的指令集。 Starting with TensorFlow 1.6, binaries use AVX instructions which may not run on older CPUs.
- 根据Tensorflow。
您有两种可能的解决方案:
谢谢你早先的答案。我正面临着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替换为适合您机器的任何版本。
尝试再次导入它应该立即运行
笔记本电脑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()