ageitgey / face_recognition

The world's simplest facial recognition api for Python and the command line
MIT License
52.9k stars 13.44k forks source link

No module named face_recognition in mod_wsgi. #1038

Open sandip-narwade opened 4 years ago

sandip-narwade commented 4 years ago

Description

When I created Virtual Environment in python, a project runs successfully. Then I am moving to deploy in mod_wsgi. That time it's showing below error.

import face_recognition               
ImportError: No module named face_recognition

What I Did

FlaskApp.conf

    <VirtualHost ***.***.***.***:80>
    ServerName test.com
    ServerAdmin test@test.com

    WSGIScriptAlias / /var/www/FlaskApp/flaskapp.wsgi
    <Directory /var/www/FlaskApp/FlaskApp/>
        Order allow,deny
        Allow from all
    </Directory>
    Alias /static /var/www/FlaskApp/FlaskApp/static
    <Directory /var/www/FlaskApp/FlaskApp/static/>
        Order allow,deny
        Allow from all
    </Directory>
    ErrorLog ${APACHE_LOG_DIR}/error.log
    LogLevel warn
    CustomLog ${APACHE_LOG_DIR}/access.log combined
  </VirtualHost>

flaskapp.wsgi

#!/usr/bin/python
import sys
import logging
logging.basicConfig(stream=sys.stderr)
sys.path.insert(0,"/var/www/FlaskApp/")

from FlaskApp import app as application
application.secret_key = 'mykey'
shreeraj04 commented 4 years ago

Any solution for the above issue yet ?