It is an open source project to track violence against women in sub-urban level in Bangladesh.
Open command prompt in a folder of your local machine.
Run
git clone https://github.com/Mak-Ta-Reque/Project-Hira-Moni-PHM
to download the project in a your local machine.
To check if python is already installed and added in your path. Run
python --version
Please make sure you are
using version 3.7.7 or newer.
If python is already installed in your machine please go to the next step Install virtualenv.
Go to the python official website to download python installer. Go through the installer window. If prompted check to install pip and add python in PATH variable. After installation, open a new CMD window and check the above way if python is successfully installed or not.
To check if virtualenv is already installed.
virtualenv --version
To install
pip install virtualenv
To create a virtual environment
cd Project-Hira-Moni-PHM
virtualenv venv
To activate the virtual environment
.\venv\Scripts\activate
Make sure working directory of you CMD is leading by (venv)
keyword.
Notice there is a requirements.txt file in your project root folder containing all the packages required for running this project. Run the following command to install the requirements
pip install -r requirements.txt
Wait for several minutes depending on your stability of connection.
deativate
python violance_analytics\manage.py runserver
make a file .env inside root of the project and write
DATABASE_URL=sqlite:///db.sqlite3
Do not upload this file in git
Without this you will get key error.
# Make sure you have python3 installed in your computer.
# Python 3.7 is recomanded
# If you don't have Python3 in your computer please follow this instruction
# [https://realpython.com/installing-python/]
python3 -m venv phm_env
source phm_env/bin/activate
deactivate
Click: Preferences -> Project Interpreter ->
The seeting icon in the right corner ->
Add -> Existing environment -> Locate the created <phm_env> folder
Click: Preferences -> Project Interpreter ->
The seeting icon in the right corner ->
Add -> New environment -> Give the location where you want to save the new environment
-> Chose base Python: Python3 from the list.
After Activating the virtual environment please clone
the project from the deafult branch. eg:
SSH Command : git clone [email protected]:Mak-Ta-Reque/Project-Hira-Moni-PHM.git
or
HTTP Command : git clone https://github.com/Mak-Ta-Reque/Project-Hira-Moni-PHM.git
SSH does't require user id and password every time. You might need to setup SSH for that
After activating your virtual environment Go inside < violence-against-women-bd > directory and install requirements
pip3 install -r requirements.txt
make a file .env inside root of the project and write
DATABASE_URL=sqlite:///db.sqlite3
Do not upload this file in git
Without this you will get key error.