I\'ve been following Sentdex\' Flask tutorial. He\'s using a Venv to set up his Flask, but didn\'t set his Python up to work with a Venv. I\'ve tried installing Flask globally -
First install python-virtualenv
Then from the Flask app directory where you put the wigs python files run
virtualenv env
This will create env directory inside the Flask directory and contains the local python installation.
Next activate the virtual environment by this command source env/bin/activate
After activating the virtual environment run pip install flask
Run pip --version
You will see something like this
pip 19.0.3 from /var/www/html/flaskapp/env/local/lib/python2.7/site-packages/pip (python 2.7)
Copy this python path
WSGIDaemonProcess FlaskApp python-path=/var/www/html/flaskapp:/var/www/html/flaskapp/env/local/lib/python2.7/site-packages
WSGIProcessGroup FlaskApp
Add above lines in FlaskApp.conf in sites-available directory of apache
Note put python-path what you get after running pip --version