<p dir="auto">Hello!<br>
When I execute the line in python <code class="notranslate">import numpy</code> the following error occurs:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last):
  File &quot;/usr/local/lib/python3.5/dist-packages/numpy/core/__init__.py&quot;, line 40, in &lt;module&gt;
    from . import multiarray
  File &quot;/usr/local/lib/python3.5/dist-packages/numpy/core/multiarray.py&quot;, line 12, in &lt;module&gt;
    from . import overrides
  File &quot;/usr/local/lib/python3.5/dist-packages/numpy/core/overrides.py&quot;, line 6, in &lt;module&gt;
    from numpy.core._multiarray_umath import (
ImportError: /usr/local/lib/python3.5/dist-packages/numpy/core/_multiarray_umath.cpython-35m-arm-linux-gnueabihf.so: undefined symbol: cblas_sgemm

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File &quot;&lt;pyshell#1&gt;&quot;, line 1, in &lt;module&gt;
    import numpy
  File &quot;/usr/local/lib/python3.5/dist-packages/numpy/__init__.py&quot;, line 142, in &lt;module&gt;
    from . import core
  File &quot;/usr/local/lib/python3.5/dist-packages/numpy/core/__init__.py&quot;, line 71, in &lt;module&gt;
    raise ImportError(msg)
ImportError: 

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the multiarray numpy extension module failed.  Most
likely you are trying to import a failed build of numpy.
Here is how to proceed:
- If you're working with a numpy git repository, try `git clean -xdf`
  (removes all files not under version control) and rebuild numpy.
- If you are simply trying to use the numpy version that you have installed:
  your installation is broken - please reinstall numpy.
- If you have already reinstalled and that did not fix the problem, then:
  1. Check that you are using the Python you expect (you're using /usr/bin/python3),
     and that you have no directories in your PATH or PYTHONPATH that can
     interfere with the Python and numpy versions you're trying to use.
  2. If (1) looks fine, you can open a new issue at
     https://github.com/numpy/numpy/issues.  Please include details on:
     - how you installed Python
     - how you installed numpy
     - your operating system
     - whether or not you have multiple versions of Python installed
     - if you built from source, your compiler versions and ideally a build log

     Note: this error has many possible causes, so please don't comment on
     an existing issue about this - open a new one instead.

Original error was: /usr/local/lib/python3.5/dist-packages/numpy/core/_multiarray_umath.cpython-35m-arm-linux-gnueabihf.so: undefined symbol: cblas_sgemm"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/numpy/core/__init__.py", line 40, in &lt;module&gt;
    from . import multiarray
  File "/usr/local/lib/python3.5/dist-packages/numpy/core/multiarray.py", line 12, in &lt;module&gt;
    from . import overrides
  File "/usr/local/lib/python3.5/dist-packages/numpy/core/overrides.py", line 6, in &lt;module&gt;
    from numpy.core._multiarray_umath import (
ImportError: /usr/local/lib/python3.5/dist-packages/numpy/core/_multiarray_umath.cpython-35m-arm-linux-gnueabihf.so: undefined symbol: cblas_sgemm

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "&lt;pyshell#1&gt;", line 1, in &lt;module&gt;
    import numpy
  File "/usr/local/lib/python3.5/dist-packages/numpy/__init__.py", line 142, in &lt;module&gt;
    from . import core
  File "/usr/local/lib/python3.5/dist-packages/numpy/core/__init__.py", line 71, in &lt;module&gt;
    raise ImportError(msg)
ImportError: 

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the multiarray numpy extension module failed.  Most
likely you are trying to import a failed build of numpy.
Here is how to proceed:
- If you're working with a numpy git repository, try `git clean -xdf`
  (removes all files not under version control) and rebuild numpy.
- If you are simply trying to use the numpy version that you have installed:
  your installation is broken - please reinstall numpy.
- If you have already reinstalled and that did not fix the problem, then:
  1. Check that you are using the Python you expect (you're using /usr/bin/python3),
     and that you have no directories in your PATH or PYTHONPATH that can
     interfere with the Python and numpy versions you're trying to use.
  2. If (1) looks fine, you can open a new issue at
     https://github.com/numpy/numpy/issues.  Please include details on:
     - how you installed Python
     - how you installed numpy
     - your operating system
     - whether or not you have multiple versions of Python installed
     - if you built from source, your compiler versions and ideally a build log

     Note: this error has many possible causes, so please don't comment on
     an existing issue about this - open a new one instead.

Original error was: /usr/local/lib/python3.5/dist-packages/numpy/core/_multiarray_umath.cpython-35m-arm-linux-gnueabihf.so: undefined symbol: cblas_sgemm
</code></pre></div>
<p dir="auto">I use Python 3.5 wich works on my Raspbian.<br>
I reinstalled numpy and it still does not work. I also tried to install different versions of numpy and to install it according to this <a href="https://stackoverflow.com/questions/11443302/compiling-numpy-with-openblas-integration/14391693#14391693" rel="nofollow">guide</a> and had no success.</p>
<p dir="auto">This is on installing numpy on raspberry pi 3. I used the Noobs latest version and so using Raspbian stretch. Python was already installed, and I think numpy was already included. At the time, I think that import numpy was working well.<br>
I installed openCV and it didn't work for a while as I had not put some necessary modules, but finally got it to work. So far so good.<br>
Later I was trying to install matplotlib, and this didn't go very smoothly. I made a number of attempts where the message in the title was already flagged. I finally manage to get the import matplotlib to work, but then numpy stopped importing. Now I cannot import either matplotlib or numpy, despite having uninstalled numpy (pip3 uninstall numpy) and reinstalled:</p>
<p dir="auto">/home/pi/.local/lib/python3.5/site-packages/numpy/tests/test_warnings.py<br>
/home/pi/.local/lib/python3.5/site-packages/numpy/version.py<br>
Proceed (y/n)? y<br>
Successfully uninstalled numpy-1.16.1<br>
pi@raspberrypi:~ $ pip3 install numpy<br>
Collecting numpy<br>
Using cached <a href="https://www.piwheels.org/simple/numpy/numpy-1.16.1-cp35-cp35m-linux_armv7l.whl" rel="nofollow">https://www.piwheels.org/simple/numpy/numpy-1.16.1-cp35-cp35m-linux_armv7l.whl</a><br>
Installing collected packages: numpy<br>
Successfully installed numpy-1.16.1<br>
pi@raspberrypi:~ $</p>
<p dir="auto">Prior to uninstalling numpy, I did try to install without uninstalling, and downloaded the cached file mentioned.</p>
<p dir="auto">Now, I cannot import numpy or matplotlib and for both get a similar error and the message telling me to raise this new issue which I am doing now.</p>
<blockquote>
<blockquote>
<blockquote>
<p dir="auto">import numpy<br>
Traceback (most recent call last):<br>
File "/home/pi/.local/lib/python3.5/site-packages/numpy/core/<strong>init</strong>.py", line 16, in <br>
from . import multiarray<br>
File "/home/pi/.local/lib/python3.5/site-packages/numpy/core/multiarray.py", line 12, in <br>
from . import overrides<br>
File "/home/pi/.local/lib/python3.5/site-packages/numpy/core/overrides.py", line 6, in <br>
from numpy.core._multiarray_umath import (<br>
ImportError: /home/pi/.local/lib/python3.5/site-packages/numpy/core/_multiarray_umath.cpython-35m-arm-linux-gnueabihf.so: undefined symbol: cblas_sgemm</p>
</blockquote>
</blockquote>
</blockquote>
<p dir="auto">During handling of the above exception, another exception occurred:</p>
<p dir="auto">Traceback (most recent call last):<br>
File "&lt;pyshell#0&gt;", line 1, in <br>
import numpy<br>
File "/home/pi/.local/lib/python3.5/site-packages/numpy/<strong>init</strong>.py", line 142, in <br>
from . import core<br>
File "/home/pi/.local/lib/python3.5/site-packages/numpy/core/<strong>init</strong>.py", line 47, in <br>
raise ImportError(msg)<br>
ImportError:</p>
<p dir="auto">IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!</p>
<p dir="auto">Importing the multiarray numpy extension module failed.  Most<br>
likely you are trying to import a failed build of numpy.<br>
Here is how to proceed:</p>
<ul dir="auto">
<li>If you're working with a numpy git repository, try <code class="notranslate">git clean -xdf</code><br>
(removes all files not under version control) and rebuild numpy.</li>
<li>If you are simply trying to use the numpy version that you have installed:<br>
your installation is broken - please reinstall numpy.</li>
<li>If you have already reinstalled and that did not fix the problem, then:
<ol dir="auto">
<li>
<p dir="auto">Check that you are using the Python you expect (you're using /usr/bin/python3),<br>
and that you have no directories in your PATH or PYTHONPATH that can<br>
interfere with the Python and numpy versions you're trying to use.</p>
</li>
<li>
<p dir="auto">If (1) looks fine, you can open a new issue at<br>
<a href="https://github.com/numpy/numpy/issues">https://github.com/numpy/numpy/issues</a>.  Please include details on:</p>
<ul dir="auto">
<li>how you installed Python</li>
<li>how you installed numpy</li>
<li>your operating system</li>
<li>whether or not you have multiple versions of Python installed</li>
<li>if you built from source, your compiler versions and ideally a build log</li>
</ul>
<p dir="auto">Note: this error has many possible causes, so please don't comment on<br>
an existing issue about this - open a new one instead.</p>
</li>
</ol>
</li>
</ul>
<p dir="auto">Original error was: /home/pi/.local/lib/python3.5/site-packages/numpy/core/_multiarray_umath.cpython-35m-arm-linux-gnueabihf.so: undefined symbol: cblas_sgemm</p>
<blockquote>
<blockquote>
<blockquote>
<p dir="auto">import matplotlib<br>
Traceback (most recent call last):<br>
File "/home/pi/.local/lib/python3.5/site-packages/numpy/core/<strong>init</strong>.py", line 16, in <br>
from . import multiarray<br>
File "/home/pi/.local/lib/python3.5/site-packages/numpy/core/multiarray.py", line 12, in <br>
from . import overrides<br>
File "/home/pi/.local/lib/python3.5/site-packages/numpy/core/overrides.py", line 6, in <br>
from numpy.core._multiarray_umath import (<br>
ImportError: /home/pi/.local/lib/python3.5/site-packages/numpy/core/_multiarray_umath.cpython-35m-arm-linux-gnueabihf.so: undefined symbol: cblas_sgemm</p>
</blockquote>
</blockquote>
</blockquote>
<p dir="auto">During handling of the above exception, another exception occurred:</p>
<p dir="auto">Traceback (most recent call last):<br>
File "&lt;pyshell#1&gt;", line 1, in <br>
import matplotlib<br>
File "/home/pi/.local/lib/python3.5/site-packages/matplotlib/<strong>init</strong>.py", line 141, in <br>
from . import cbook, rcsetup<br>
File "/home/pi/.local/lib/python3.5/site-packages/matplotlib/cbook/<strong>init</strong>.py", line 33, in <br>
import numpy as np<br>
File "/home/pi/.local/lib/python3.5/site-packages/numpy/<strong>init</strong>.py", line 142, in <br>
from . import core<br>
File "/home/pi/.local/lib/python3.5/site-packages/numpy/core/<strong>init</strong>.py", line 47, in <br>
raise ImportError(msg)<br>
ImportError:</p>
<p dir="auto">IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!</p>
<p dir="auto">Importing the multiarray numpy extension module failed.  Most<br>
likely you are trying to import a failed build of numpy.<br>
Here is how to proceed:</p>
<ul dir="auto">
<li>If you're working with a numpy git repository, try <code class="notranslate">git clean -xdf</code><br>
(removes all files not under version control) and rebuild numpy.</li>
<li>If you are simply trying to use the numpy version that you have installed:<br>
your installation is broken - please reinstall numpy.</li>
<li>If you have already reinstalled and that did not fix the problem, then:
<ol dir="auto">
<li>
<p dir="auto">Check that you are using the Python you expect (you're using /usr/bin/python3),<br>
and that you have no directories in your PATH or PYTHONPATH that can<br>
interfere with the Python and numpy versions you're trying to use.</p>
</li>
<li>
<p dir="auto">If (1) looks fine, you can open a new issue at<br>
<a href="https://github.com/numpy/numpy/issues">https://github.com/numpy/numpy/issues</a>.  Please include details on:</p>
<ul dir="auto">
<li>how you installed Python</li>
<li>how you installed numpy</li>
<li>your operating system</li>
<li>whether or not you have multiple versions of Python installed</li>
<li>if you built from source, your compiler versions and ideally a build log</li>
</ul>
<p dir="auto">Note: this error has many possible causes, so please don't comment on<br>
an existing issue about this - open a new one instead.</p>
</li>
</ol>
</li>
</ul>
<p dir="auto">Original error was: /home/pi/.local/lib/python3.5/site-packages/numpy/core/_multiarray_umath.cpython-35m-arm-linux-gnueabihf.so: undefined symbol: cblas_sgemm</p>
<p dir="auto">I hope this helps and that it will eventually contribute to making the installation of these two packages easier in the future.</p>
<p dir="auto">Thanks,</p>
<p dir="auto">Thomas</p>