Categories
Linux Mastering Development Ubuntu

Target WSGI script ‘/var/www/FlaskApp/flaskapp.wsgi’ cannot be loaded as Python module

Stuck here for days

mod_wsgi (pid=16615): Target WSGI script '/var/www/FlaskApp/flaskapp.wsgi' cannot be loaded as Python module.
mod_wsgi (pid=16615): Exception occurred processing WSGI script '/var/www/FlaskApp/flaskapp.wsgi'.
Traceback (most recent call last):
File "/var/www/FlaskApp/flaskapp.wsgi", line 7, in <module>
from FlaskApp import app as application
File "/var/www/FlaskApp/FlaskApp/__init__.py", line 6, in <module>
from Recognition import testCode,trainCode
File "/home/example_2019/Recognition.py", line 2, in <module>
from sklearn import neighbors
File "/usr/local/lib/python3.6/dist-packages/sklearn/__init__.py", line 75, in <module>
[Tue Mar 17 14:00:00.971169 2020] [wsgi:error] [pid 16615:tid 140452233717504] [client 27.6.233.75:3942]     from . import __check_build
File "/usr/local/lib/python3.6/dist-packages/sklearn/__check_build/__init__.py", line 46, in <module>
raise_build_error(e)
File "/usr/local/lib/python3.6/dist-packages/sklearn/__check_build/__init__.py", line 41, in raise_build_error
%s""" % (e, local_dir, ''.join(dir_content).strip(), msg))
ImportError: No module named _check_build
___________________________________________________________________________
Contents of /usr/local/lib/python3.6/dist-packages/sklearn/__check_build:
__init__.py               setup.py                  _check_build.cpython-36m-x86_64-linux-gnu.so
__pycache__
___________________________________________________________________________
It seems that scikit-learn has not been built correctly.
If you have installed scikit-learn from source, please do not forget
to build the package before using it: run `python setup.py install` or
`make` in the source directory.
If you have used an installer, please check that it is suited for your
Python version, your operating system and your platform.

Leave a Reply

Your email address will not be published. Required fields are marked *