<h3 dir="auto">Numpy/Python version information: 1.19.1</h3>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="
We have compiled some common reasons and troubleshooting tips at:

    https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

  * The Python version is: Python3.8 from &quot;/usr/local/bin/uwsgi&quot;
  * The NumPy version is: &quot;1.19.1&quot;

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /usr/local/lib/python3.8/site-packages/numpy/core/_multiarray_umath.cpython-38-x86_64-linux-gnu.so)
"><pre class="notranslate">We have compiled some common reasons and troubleshooting tips at:

    https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

  <span class="pl-k">*</span> The Python version is: Python3.8 from <span class="pl-s"><span class="pl-pds">"</span>/usr/local/bin/uwsgi<span class="pl-pds">"</span></span>
  <span class="pl-k">*</span> The NumPy version is: <span class="pl-s"><span class="pl-pds">"</span>1.19.1<span class="pl-pds">"</span></span>

and make sure that they are the versions you expect.
Please carefully study the documentation linked above <span class="pl-k">for</span> further help.

Original error was: Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /usr/local/lib/python3.8/site-packages/numpy/core/_multiarray_umath.cpython-38-x86_64-linux-gnu.so)
</pre></div>
<p dir="auto">I'm trying to deploy a Flask-based application (Python 3) in AWS EC2 using Apache and mod_wsgi with all the necessary packages being installed in a miniconda environment.</p>
<p dir="auto">Bellow you can find my app.wsgi file:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import sys
import logging
import site
    
site.addsitedir('/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/')
logging.basicConfig(stream=sys.stderr)
sys.path.insert(0,&quot;/var/www/html/flaskapp/&quot;)
sys.stdout = sys.stderr
    
from app import app as application"><pre class="notranslate"><code class="notranslate">import sys
import logging
import site
    
site.addsitedir('/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/')
logging.basicConfig(stream=sys.stderr)
sys.path.insert(0,"/var/www/html/flaskapp/")
sys.stdout = sys.stderr
    
from app import app as application
</code></pre></div>
<p dir="auto">Also, here's my Apache config file:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ServerAdmin webmaster@localhost
DocumentRoot /var/www/html

WSGIDaemonProcess flaskapp threads=5 python-home=/home/ubuntu/miniconda3/envs/app_env
WSGIScriptAlias / /var/www/html/flaskapp/app.wsgi

&lt;Directory flaskapp&gt;
        WSGIProcessGroup flaskapp
        WSGIApplicationGroup %{GLOBAL}
        Order deny,allow
        Allow from all
&lt;/Directory&gt;

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined"><pre class="notranslate"><code class="notranslate">ServerAdmin webmaster@localhost
DocumentRoot /var/www/html

WSGIDaemonProcess flaskapp threads=5 python-home=/home/ubuntu/miniconda3/envs/app_env
WSGIScriptAlias / /var/www/html/flaskapp/app.wsgi

&lt;Directory flaskapp&gt;
        WSGIProcessGroup flaskapp
        WSGIApplicationGroup %{GLOBAL}
        Order deny,allow
        Allow from all
&lt;/Directory&gt;

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</code></pre></div>
<p dir="auto">However, when I reload my server, I keep getting the same error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[Wed Jul 18 12:24:12.897534 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] mod_wsgi (pid=10224): Target WSGI script '/var/www/html/flaskapp/app.wsgi' cannot be loaded as Python module., referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.897592 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] mod_wsgi (pid=10224): Exception occurred processing WSGI script '/var/www/html/flaskapp/app.wsgi'., referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900007 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] Traceback (most recent call last):, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900033 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]   File &quot;/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/numpy/core/__init__.py&quot;, line 16, in &lt;module&gt;, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900045 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]     from . import multiarray, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900062 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] ImportError: cannot import name 'multiarray', referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900072 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] , referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900075 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] During handling of the above exception, another exception occurred:, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900078 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] , referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900083 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] Traceback (most recent call last):, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900171 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]   File &quot;/var/www/html/flaskapp/app.wsgi&quot;, line 10, in &lt;module&gt;, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900176 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]     from app import app as application, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900181 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]   File &quot;/var/www/html/flaskapp/app.py&quot;, line 4, in &lt;module&gt;, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900184 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]     app = create_app(), referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900189 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]   File &quot;/var/www/html/flaskapp/app/__init__.py&quot;, line 33, in create_app, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900192 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]     from app.data import bp as data_bp, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900197 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]   File &quot;/var/www/html/flaskapp/app/data/__init__.py&quot;, line 18, in &lt;module&gt;, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900200 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]     from app.data import views, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900205 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]   File &quot;/var/www/html/flaskapp/app/data/views.py&quot;, line 7, in &lt;module&gt;, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900207 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]     from app.lca import mongo, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900212 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]   File &quot;/var/www/html/flaskapp/app/lca/__init__.py&quot;, line 3, in &lt;module&gt;, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900215 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]     import brightway2 as bw2, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900223 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]   File &quot;/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/brightway2/__init__.py&quot;, line 2, in &lt;module&gt;, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900226 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]     from bw2data import *, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900231 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]   File &quot;/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/bw2data/__init__.py&quot;, line 33, in &lt;module&gt;, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900234 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]     from .project import projects, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900239 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]   File &quot;/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/bw2data/project.py&quot;, line 9, in &lt;module&gt;, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900242 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]     from .utils import python_2_unicode_compatible, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900246 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]   File &quot;/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/bw2data/utils.py&quot;, line 19, in &lt;module&gt;, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900249 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]     import stats_arrays as sa, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900254 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]   File &quot;/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/stats_arrays/__init__.py&quot;, line 5, in &lt;module&gt;, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900257 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]     from .distributions import *, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900262 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]   File &quot;/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/stats_arrays/distributions/__init__.py&quot;, line 1, in &lt;module&gt;, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900265 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]     from .base import UncertaintyBase, BoundedUncertaintyBase, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900270 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]   File &quot;/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/stats_arrays/distributions/base.py&quot;, line 5, in &lt;module&gt;, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900273 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]     from ..utils import one_row_params_array, construct_params_array, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900277 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]   File &quot;/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/stats_arrays/utils.py&quot;, line 3, in &lt;module&gt;, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900280 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]     import numpy as np, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900287 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]   File &quot;/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/numpy/__init__.py&quot;, line 142, in &lt;module&gt;, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900290 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]     from . import add_newdocs, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900295 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]   File &quot;/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/numpy/add_newdocs.py&quot;, line 13, in &lt;module&gt;, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900298 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]     from numpy.lib import add_newdoc, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900302 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]   File &quot;/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/numpy/lib/__init__.py&quot;, line 8, in &lt;module&gt;, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900305 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]     from .type_check import *, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900310 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]   File &quot;/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/numpy/lib/type_check.py&quot;, line 11, in &lt;module&gt;, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900313 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]     import numpy.core.numeric as _nx, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/    
[Wed Jul 18 12:24:12.900318 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]   File &quot;/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/numpy/core/__init__.py&quot;, line 26, in &lt;module&gt;, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900321 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]     raise ImportError(msg), referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900336 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] ImportError: , referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900352 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] Importing the multiarray numpy extension module failed.  Most, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900355 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] likely you are trying to import a failed build of numpy., referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900357 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] If you're working with a numpy git repo, try `git clean -xdf` (removes all, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900360 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] files not under version control).  Otherwise reinstall numpy., referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900362 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] , referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900365 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] Original error was: cannot import name 'multiarray', referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900369 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] , referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/"><pre class="notranslate"><code class="notranslate">[Wed Jul 18 12:24:12.897534 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] mod_wsgi (pid=10224): Target WSGI script '/var/www/html/flaskapp/app.wsgi' cannot be loaded as Python module., referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.897592 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] mod_wsgi (pid=10224): Exception occurred processing WSGI script '/var/www/html/flaskapp/app.wsgi'., referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900007 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] Traceback (most recent call last):, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900033 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]   File "/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/numpy/core/__init__.py", line 16, in &lt;module&gt;, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900045 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]     from . import multiarray, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900062 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] ImportError: cannot import name 'multiarray', referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900072 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] , referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900075 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] During handling of the above exception, another exception occurred:, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900078 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] , referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900083 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] Traceback (most recent call last):, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900171 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]   File "/var/www/html/flaskapp/app.wsgi", line 10, in &lt;module&gt;, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900176 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]     from app import app as application, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900181 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]   File "/var/www/html/flaskapp/app.py", line 4, in &lt;module&gt;, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900184 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]     app = create_app(), referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900189 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]   File "/var/www/html/flaskapp/app/__init__.py", line 33, in create_app, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900192 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]     from app.data import bp as data_bp, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900197 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]   File "/var/www/html/flaskapp/app/data/__init__.py", line 18, in &lt;module&gt;, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900200 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]     from app.data import views, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900205 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]   File "/var/www/html/flaskapp/app/data/views.py", line 7, in &lt;module&gt;, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900207 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]     from app.lca import mongo, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900212 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]   File "/var/www/html/flaskapp/app/lca/__init__.py", line 3, in &lt;module&gt;, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900215 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]     import brightway2 as bw2, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900223 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]   File "/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/brightway2/__init__.py", line 2, in &lt;module&gt;, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900226 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]     from bw2data import *, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900231 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]   File "/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/bw2data/__init__.py", line 33, in &lt;module&gt;, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900234 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]     from .project import projects, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900239 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]   File "/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/bw2data/project.py", line 9, in &lt;module&gt;, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900242 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]     from .utils import python_2_unicode_compatible, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900246 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]   File "/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/bw2data/utils.py", line 19, in &lt;module&gt;, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900249 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]     import stats_arrays as sa, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900254 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]   File "/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/stats_arrays/__init__.py", line 5, in &lt;module&gt;, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900257 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]     from .distributions import *, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900262 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]   File "/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/stats_arrays/distributions/__init__.py", line 1, in &lt;module&gt;, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900265 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]     from .base import UncertaintyBase, BoundedUncertaintyBase, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900270 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]   File "/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/stats_arrays/distributions/base.py", line 5, in &lt;module&gt;, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900273 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]     from ..utils import one_row_params_array, construct_params_array, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900277 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]   File "/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/stats_arrays/utils.py", line 3, in &lt;module&gt;, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900280 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]     import numpy as np, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900287 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]   File "/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/numpy/__init__.py", line 142, in &lt;module&gt;, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900290 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]     from . import add_newdocs, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900295 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]   File "/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/numpy/add_newdocs.py", line 13, in &lt;module&gt;, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900298 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]     from numpy.lib import add_newdoc, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900302 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]   File "/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/numpy/lib/__init__.py", line 8, in &lt;module&gt;, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900305 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]     from .type_check import *, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900310 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]   File "/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/numpy/lib/type_check.py", line 11, in &lt;module&gt;, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900313 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]     import numpy.core.numeric as _nx, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/    
[Wed Jul 18 12:24:12.900318 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]   File "/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/numpy/core/__init__.py", line 26, in &lt;module&gt;, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900321 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351]     raise ImportError(msg), referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900336 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] ImportError: , referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900352 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] Importing the multiarray numpy extension module failed.  Most, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900355 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] likely you are trying to import a failed build of numpy., referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900357 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] If you're working with a numpy git repo, try `git clean -xdf` (removes all, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900360 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] files not under version control).  Otherwise reinstall numpy., referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900362 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] , referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900365 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] Original error was: cannot import name 'multiarray', referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900369 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] , referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
</code></pre></div>
<p dir="auto">I've tried multiple times to reinstall numpy and create a new conda environment but the problem seems to be persisting. Moreover, if I activate my conda env I can import directly multiarray (<code class="notranslate">from numpy.core import multiarray</code>). The app also runs perfectly if I load it directly as a localhost (<code class="notranslate">python app.py</code>). Is there some peculiarity when trying to import numpy via mod_wsgi?</p>
<p dir="auto">Thanks!</p>