I\'m trying to get a Flask app running on AWS EC2 (standard Ubuntu AMI) through an Apache2 Webserver. My app internally uses Numpy. I have tested the following:
This:
site.addsitedir('/home/ubuntu/.local/lib/python2.7/site-packages/numpy')
should have been:
site.addsitedir('/home/ubuntu/.local/lib/python2.7/site-packages')
But the whole way you are setting up Python virtual environments is not best practice anyway. Suggest you read:
Also try and switch to daemon mode, it is better to use daemon mode than embedded mode.