Illegal instruction (core dumped) after running import tensorflow

后端 未结 6 735
南方客
南方客 2020-11-29 08:21

I created a fresh virtual environment: virtualenv -p python2 test_venv/ And installed tensorflow: pip install --upgrade --no-cache-dir tensorflow

6条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-29 08:33

    I had a similar issue and it turned out that it is due to I have slightly old CPU and that doesn't work very well with 1.6+ versions of TensorFlow https://www.tensorflow.org/install/source

    Note: Starting with TensorFlow 1.6, binaries use AVX instructions which may not run on older CPUs.

    So as mentioned before you can either install TensorFlow 1.5, or if you still want the latest version of TF, you will need to install it with conda instead (both solutions worked with me)

    For conda installation:

    conda create -n tensorflow
    conda install tensorflow-gpu -n tensorflow
    

    https://github.com/tensorflow/tensorflow/issues/17411

提交回复
热议问题