numpy version error when importing tensorflow
<p>I have executed <code>pip install</code> for tensorflow.</p>

<p>Under the python command line environment, when I tried </p>

<pre><code>import tensorflow as tf
</code></pre>

<p>I met the following errors:</p>

<pre><code>RuntimeError: module compiled against API version 0xa but this version of numpy is 0x9
Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/__init__.py", line 23, in &lt;module&gt;
    from tensorflow.python import *
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/__init__.py", line 49, in &lt;module&gt;
    from tensorflow.python import pywrap_tensorflow
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in &lt;module&gt;
    _pywrap_tensorflow = swig_import_helper()
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)
ImportError: numpy.core.multiarray failed to import
</code></pre>

<p>I have checked my <code>numpy</code> version using <code>print numpy.__version__</code>. It showed <code>"1.8.2"</code>. So, what should I do now? Thanks!</p>

<p>From the error, it looks like you're running python 2.7 from <code>usr/local/bin</code>. There is a mismatch problem between your <code>numpy</code> version and <code>tensorflow</code> installation. I'd recommend you to install anaconda since it will make sure that correct version of <code>tensorflow</code> that is compatible with your <code>numpy</code> version be installed.</p>

<p>Once you have anaconda, then do:</p>

<pre><code>conda install tensorflow
</code></pre>

python python-2.7 numpy runtime-error tensorflow