Error when importing numpy (SyntaxError)
<p>I suddenly obtained such error when importing numpy:</p>

<p><a href="http://i.stack.imgur.com/G3Z8f.png" rel="nofollow">Print screen with error</a></p>

<p>It shows up when I type </p>

<pre><code>import numpy as np
</code></pre>

<p>or just</p>

<pre><code>import numpy
</code></pre>

<p>It also happens in python console as follows:</p>

<pre><code>    Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:24:40) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
&gt;&gt;&gt; import numpy
Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  File "C:\Py27_64\lib\site-packages\numpy\__init__.py", line 180, in &lt;module&gt;
    from . import add_newdocs
  File "C:\Py27_64\lib\site-packages\numpy\add_newdocs.py", line 13, in &lt;module&gt;
    from numpy.lib import add_newdoc
  File "C:\Py27_64\lib\site-packages\numpy\lib\__init__.py", line 22, in &lt;module&gt;
    from .npyio import *
  File "C:\Py27_64\lib\site-packages\numpy\lib\npyio.py", line 1162
    x                                    % (str(X.dtype), format))
    ^
SyntaxError: invalid syntax
</code></pre>

<p>No numpy functions calling needed to get this error - it happens when importing numpy.
I was able to succesfully work with numpy earlier.
All other Python functions work well. I tried reinstalling numpy - didn't work. I work on Python 2.7 64bit with PyScripter.
I didn't install anything new recently, it happend just like so. </p>

<p>Check that you use a Python 2 edition of numpy.</p>

python numpy syntax-error