# Installation ## Dependencies * Python 3.7 + * virtualenv * Install postgresql and add pg_config to PATH * Install Apache server (Alternatively, on a Mac, make sure you have xcode installed, which includes Apache server) ## Install Python requirements Run the following commands in the root folder * Create a virtual environment. ```python3 -m venv virt_env``` * Activate the virtual env ```source virt_env\bin\activate``` * Install python requirements ```pip3 install -r requirements.txt``` ### Troubleshooting pip install errros on a Mac * Install python 3.7 if you don't already have it. Latest xcode upgrades to 3.9, which does not work. * psutil fails because of Mac architecture. Set env variable ```export ARCHFLAGS="-arch x86_64"``` * Update requirements.txt to install ```psycopg2-binary``` instead of ```psycopg2``` ## Run Django migrations * ```cd src``` * ```python3 manage.py migrate``` ## Run Django application * ```python3 manage.py runserver ``` ## Register cronjobs for generating Dashboard reports * Register - ```python3 manage.py crontab add```