In the project folder run
then run
Install R globally Install R packages - r-prodlim, r-pec
-
Go to api folder
-
Create a virtual environment (if not created already)
python -m venv venv
-
Activate the virtual environment (windows)
.\venv\Scripts\activate
(ubuntu)source venv/bin/activate
-
Install dependencies from requirements.txt
pip install -r requirements.txt
-
set up flask app
set FLASK_APP=backend.py
-
run flask
flask run
-
if new dependencies are added, update requirements.txt
pip freeze > requirements.txt
Python version <3.8 for rpy2
Create an ancaonda environment :
Activate the environment:
Install necessary packages : c Install R globally
- Install Flask -
- Install Flask_CORS -
- Install Pandas -
- Insall Numpy -
- Install rpy2 -
- Install r-prodlim -
- Install r-pec -
Navigate to api folder then run