Create requirements.txt
to list of depedency libraries.
# Check latest version: https://pypi.python.org/pypi/Flask
Flask==0.12.2
Flask-SQLAlchemy==2.3
MySQL-python==1.2.5
python-dateutil==2.6.1
Install virtualenv
.
sudo -H pip install virtualenv
Create a virtualenv named env
and activate it.
virtualenv envsource env/bin/activate
Install dependencies into lib
directory.
pip install -t lib -r requirements.txt
Deactivate env.
deactivate
Python files to include the lib
directory.
import syssys.path.append('lib')from flask import Flask