<h3 dir="auto">Reproducing code example:</h3>

<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">numpy</span></pre></div>

<h3 dir="auto">Error message:</h3>
<p dir="auto">I am trying to import numpy within a virtual python environment on my raspberry pi. However, each time I attempt to import numpy on my Jupiter notebook (connected via ssh) I get an <code class="notranslate">import error</code> message (apologies it’s an image, I can’t get the iPad app to copy text):</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/45598743/79617484-884d3b00-80ff-11ea-84e2-bde316da7997.png"><img src="https://user-images.githubusercontent.com/45598743/79617484-884d3b00-80ff-11ea-84e2-bde316da7997.png" alt="925E13CC-8A17-4195-A06B-3E0BE5FB8205" style="max-width: 100%;"></a><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/45598743/79617491-8be0c200-80ff-11ea-8bd1-86389c3f11cb.png"><img src="https://user-images.githubusercontent.com/45598743/79617491-8be0c200-80ff-11ea-8bd1-86389c3f11cb.png" alt="A997E952-EEC1-4583-A2E7-E0A84A98A9D7" style="max-width: 100%;"></a></p>
<h3 dir="auto">How I installed numpy</h3>
<p dir="auto"><code class="notranslate">pip3 install numpy</code></p>
<h3 dir="auto">Numpy/Python Version</h3>
<p dir="auto">Python 3.7.3<br>
Numpy 1.18.2</p>
<h3 dir="auto">Actions taken so far</h3>
<ul dir="auto">
<li>I have reinstalled numpy within my virtual environment using:<br>
<code class="notranslate">pip install --upgrade --force-reinstall numpy</code></li>
<li>I have checked numpy within my non-virtualised environment and it works perfectly fine, so there’s something about my virtual environment it doesn’t like.</li>
</ul>
<p dir="auto">Can anyone see what the issue might be? Thanks in advance.</p>
<p dir="auto">When i try to run a python script that uses numpy, i receive the following error:<br>
ImportError: Unable to import required dependencies.<br>
...<br>
Original error was: /lib/arm-linux-gnueabihf/libm.so.6: version `GLIBC_2.27' not found (required by /usr/local/lib/python3.7/site-packages/numpy/core/_multiarray_umath.cpython-37m-arm-linux-gnueabihf.so)"</p>
<h3 dir="auto">Reproducing code example:</h3>
<p dir="auto">Can be reproduced simply with this:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span></pre></div>
<h3 dir="auto">Error message:</h3>
<p dir="auto">_Traceback (most recent call last):<br>
File "&lt;pyshell#0&gt;", line 1, in <br>
import numpy<br>
File "/usr/local/lib/python3.7/site-packages/numpy/<strong>init</strong>.py", line 142, in <br>
from . import core<br>
File "/usr/local/lib/python3.7/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 numpy c-extensions failed.</p>
<ul dir="auto">
<li>
<p dir="auto">Try uninstalling and reinstalling numpy.</p>
</li>
<li>
<p dir="auto">If you have already done that, then:</p>
<ol dir="auto">
<li>Check that you expected to use Python3.7 from "/usr/local/bin/python3.7",<br>
and that you have no directories in your PATH or PYTHONPATH that can<br>
interfere with the Python and numpy version "1.17.2" you're trying to use.</li>
<li>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:
<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>
</li>
</ol>
</li>
<li>
<p dir="auto">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.</p>
</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>
<p dir="auto">Original error was: /lib/arm-linux-gnueabihf/libm.so.6: version `GLIBC_2.27' not found (required by /usr/local/lib/python3.7/site-packages/numpy/core/<em>multiarray_umath.cpython-37m-arm-linux-gnueabihf.so)</em></p>
<h3 dir="auto">Numpy/Python version information:</h3>
<p dir="auto">Unable to run the recommended command, but here is what I know about the version info:<br>
Python is 3.7 (if I import numpy on 3.5 or 2.7 it works)<br>
numpy is 1.17.2</p>
<h3 dir="auto">Additional Info</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" - how you installed Python: I'm sorry I don't remember how or know how to find out.
 - how you installed numpy: tried several ways, the most recent being `sudo pip3.7 install numpy`
 - your operating system: Linux raspberrypi 4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019 armv7l GNU/Linux
 - whether or not you have multiple versions of Python installed: 2.7, 3.5, 3.7  Possibly others, I'm not sure how to tell.
 - if you built from source, your compiler versions and ideally a build log: Not sure where to grab this."><pre class="notranslate"><code class="notranslate"> - how you installed Python: I'm sorry I don't remember how or know how to find out.
 - how you installed numpy: tried several ways, the most recent being `sudo pip3.7 install numpy`
 - your operating system: Linux raspberrypi 4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019 armv7l GNU/Linux
 - whether or not you have multiple versions of Python installed: 2.7, 3.5, 3.7  Possibly others, I'm not sure how to tell.
 - if you built from source, your compiler versions and ideally a build log: Not sure where to grab this.
</code></pre></div>
<p dir="auto">I should note that I first received this error and got "libf77blas.so.3...no such file" for the "Original error" section. I made it past that by installing some dependencies from here: <a href="https://stackoverflow.com/questions/53347759/importerror-libcblas-so-3-cannot-open-shared-object-file-no-such-file-or-dire" rel="nofollow">https://stackoverflow.com/questions/53347759/importerror-libcblas-so-3-cannot-open-shared-object-file-no-such-file-or-dire</a></p>
<p dir="auto">I apologize for the lack of details. I'm new to Linux and relatively new to Python, but I'll happily gather anything else that's needed if you can point me in the right direction.</p>