Illegal instruction (core dumped) after running import tensorflow : <p>I created a fresh virtual environment: <code>virtualenv -p python2 test_venv/</code>
And installed tensorflow: <code>pip install --upgrade --no-cache-dir tensorflow</code></p>

<p><code>import tensorflow</code> gives me <code>Illegal instruction (core dumped)</code></p>

<p>Please help me understand what's going on and how I can fix it. Thank you.</p>

<h3>CPU information:</h3>

<pre><code>-cpu
          description: CPU
          product: Intel(R) Core(TM) i3 CPU       M 330  @ 2.13GHz
          bus info: cpu@0
          version: CPU Version
          capabilities: x86-64 fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm tpr_shadow vnmi flexpriority ept vpid dtherm arat cpufreq
</code></pre>

<h3>Stacktrace obtained with gdb:</h3>

<pre><code>#0  0x00007fffe5793880 in std::pair&lt;std::__detail::_Node_iterator&lt;std::pair&lt;tensorflow::StringPiece const, std::function&lt;bool (tensorflow::Variant*)&gt; &gt;, false, true&gt;, bool&gt; std::_Hashtable&lt;tensorflow::StringPiece, std::pair&lt;tensorflow::StringPiece const, std::function&lt;bool (tensorflow::Variant*)&gt; &gt;, std::allocator&lt;std::pair&lt;tensorflow::StringPiece const, std::function&lt;bool (tensorflow::Variant*)&gt; &gt; &gt;, std::__detail::_Select1st, std::equal_to&lt;tensorflow::StringPiece&gt;, tensorflow::StringPieceHasher, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits&lt;true, false, true&gt; &gt;::_M_emplace&lt;std::pair&lt;tensorflow::StringPiece, std::function&lt;bool (tensorflow::Variant*)&gt; &gt; &gt;(std::integral_constant&lt;bool, true&gt;, std::pair&lt;tensorflow::StringPiece, std::function&lt;bool (tensorflow::Variant*)&gt; &gt;&amp;&amp;) ()
   from /media/gerry/hdd_1/ws_hdd/test_venv/local/lib/python2.7/site-packages/tensorflow/python/../libtensorflow_framework.so
#1  0x00007fffe5795735 in tensorflow::UnaryVariantOpRegistry::RegisterDecodeFn(std::string const&amp;, std::function&lt;bool (tensorflow::Variant*)&gt; const&amp;) () from /media/gerry/hdd_1/ws_hdd/test_venv/local/lib/python2.7/site-packages/tensorflow/python/../libtensorflow_framework.so
#2  0x00007fffe5770a7c in tensorflow::variant_op_registry_fn_registration::UnaryVariantDecodeRegistration&lt;tensorflow::Tensor&gt;::UnaryVariantDecodeRegistration(std::string const&amp;) ()
   from /media/gerry/hdd_1/ws_hdd/test_venv/local/lib/python2.7/site-packages/tensorflow/python/../libtensorflow_framework.so
#3  0x00007fffe56ea165 in _GLOBAL__sub_I_tensor.cc ()
   from /media/gerry/hdd_1/ws_hdd/test_venv/local/lib/python2.7/site-packages/tensorflow/python/../libtensorflow_framework.so
#4  0x00007ffff7de76ba in call_init (l=&lt;optimized out&gt;, argc=argc@entry=2, argv=argv@entry=0x7fffffffd5c8, env=env@entry=0xa7b4d0)
    at dl-init.c:72
#5  0x00007ffff7de77cb in call_init (env=0xa7b4d0, argv=0x7fffffffd5c8, argc=2, l=&lt;optimized out&gt;) at dl-init.c:30
#6  _dl_init (main_map=main_map@entry=0xa11920, argc=2, argv=0x7fffffffd5c8, env=0xa7b4d0) at dl-init.c:120
#7  0x00007ffff7dec8e2 in dl_open_worker (a=a@entry=0x7fffffffb5c0) at dl-open.c:575
#8  0x00007ffff7de7564 in _dl_catch_error (objname=objname@entry=0x7fffffffb5b0, errstring=errstring@entry=0x7fffffffb5b8, 
    mallocedp=mallocedp@entry=0x7fffffffb5af, operate=operate@entry=0x7ffff7dec4d0 &lt;dl_open_worker&gt;, args=args@entry=0x7fffffffb5c0)
    at dl-error.c:187
#9  0x00007ffff7debda9 in _dl_open (
    file=0x7fffea7cbc34 "/media/gerry/hdd_1/ws_hdd/test_venv/local/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so", mode=-2147483646, caller_dlopen=0x51ad19 &lt;_PyImport_GetDynLoadFunc+233&gt;, nsid=-2, argc=&lt;optimized out&gt;, argv=&lt;optimized out&gt;, env=0xa7b4d0)
    at dl-open.c:660
#10 0x00007ffff75ecf09 in dlopen_doit (a=a@entry=0x7fffffffb7f0) at dlopen.c:66
#11 0x00007ffff7de7564 in _dl_catch_error (objname=0x9b1870, errstring=0x9b1878, mallocedp=0x9b1868, operate=0x7ffff75eceb0 &lt;dlopen_doit&gt;, 
    args=0x7fffffffb7f0) at dl-error.c:187
#12 0x00007ffff75ed571 in _dlerror_run (operate=operate@entry=0x7ffff75eceb0 &lt;dlopen_doit&gt;, args=args@entry=0x7fffffffb7f0) at dlerror.c:163
#13 0x00007ffff75ecfa1 in __dlopen (file=&lt;optimized out&gt;, mode=&lt;optimized out&gt;) at dlopen.c:87
#14 0x000000000051ad19 in _PyImport_GetDynLoadFunc ()
#15 0x000000000051a8e4 in _PyImport_LoadDynamicModule ()
#16 0x00000000005b7b1b in ?? ()
#17 0x00000000004bc3fa in PyEval_EvalFrameEx ()
#18 0x00000000004c136f in PyEval_EvalFrameEx ()
#19 0x00000000004b9ab6 in PyEval_EvalCodeEx ()
#20 0x00000000004b97a6 in PyEval_EvalCode ()
#21 0x00000000004b96df in PyImport_ExecCodeModuleEx ()
#22 0x00000000004b2b06 in ?? ()
#23 0x00000000004a4ae1 in ?? ()
</code></pre>
