pythontensorflowvirtualenvpython-3.6illegal-instruction

Illegal hardware instruction when trying to import tensorflow


I just installed tensorflow using the instructions for the virtualenv method. The installation process went smoothly, so I don't think there was any problem there. After installation I proceeded to try and import it to validate that everything is ok, and I got the following message:

[1]    4492 illegal hardware instruction (core dumped)  python

This happened after I use the following command using th python interactive console:

import tensorflow as tf

I tried using the link with pip to reinstall it, but no success.

I have created the virtualenv with:

python3.6 -m venv venv

After this didn't work (as in it generated the same error) I tried with:

virtualenv --system-site-packages -p python3.6 venv

I got the same result.

The command I used to install tensorflow was:

pip install tensorflow

As you can see, I intend to install the CPU-only version.

I read some think about other frameworks and technologies that show this message em the hardware does not have the instruction implemented, so there's nothing to do about that except getting new hardware.

Is there any way to fix this issue? I already tried some different installation methods, but none of then seen to work

As for the system specifications:

OS = Ubuntu 16.04 x64 LTS
Python = Python 3.6
pip version = 9.0.1
tensorflow version = TensorFlow 1.6.0
CPU = Intel Core 2 Quad Q6600  @2.40GHz

OBS: I do have a GPU on this machine, but I don't think that tensorflow will run on it, since it is kind of old. It's a Nvidia 8800 GTS 512.

I appreciate any help, and if there's any missing info, please let me know.


Solution

  • I just found this:

    Illegal instruction (core dumped) after running import tensorflow

    This problem seems to be caused by a set of instructions that are not hardware implemented in some older processors (AVX instruction set). Since they are not implemented in hardware, there's no real fix for this problem.

    If I understood it correctly, and a workaround is to downgrade tensorflow from 1.6.0 to 1.5.0, this also applies to the GPU version. It worked for me.

    I Will mark this as answered for now, but if anyone have any good idea how to get version 1.6.0 working, please let me know.