This guide provides instructions on how to set up and run the project locally. Follow these steps to get started with the project.
- Python 3.11.8
- virtualenv 20.25.0
- MySQL
- pkg-config 0.29.2
-
Install Python:
- Ensure Python 3.11.6 is installed on your system. If not, download and install Python from python.org.
-
Install MySQL and Configure it:
- Install MySQL on your system following the instructions provided by MySQL's official documentation.
- Update database information in
rx-assist/rx-assist/settings.pyif necessary. - By default, this project connects to MySQL as the root user without requiring a password.
-
Create Database and Import Tables:
- Create a new database in MySQL.
mysql create database rx_db - Import tables using
rxdb.sql:mysql -u root rx_db < rxdb.sql
- Create a new database in MySQL.
-
Run Diagnosis.py and Prescription.py:
- Execute
Diagnosis.pyandPrescription.pyusing Python:These store python pickle files into directorypython Diagnosis.py python Prescription.py/rx-assist/models
- Execute
-
Create a Python Environment:
- Create a virtual Python environment using the command:
Or
python -m venv envpython@Version -m venv env
- Create a virtual Python environment using the command:
-
Activate the Environment:
source env/bin/activate -
Set up the Virtual Environment:
- Install all the required packages using pip and the requirements.txt.
pip install -r requirements.txtThis expands to the below.pip install Django==5.0.3 pip install scikit-learn==1.3.2 pip install pandas==2.1.4 pip install packaging==23.2 pip install pyparsing==3.1.1 pip install wheel==0.42.0 pip install mysqlclient==2.1.1 pip install Pillow==1.1.0
- Activate Environment and Run Project:
- Before running the project, always make sure the virtual environment is active.
source env/bin/activate - Change directory to
rx-assistand runpython manage.py runserver
Here's the set of pip packages and versions that were used when testing this project:
| Package | Version |
|---|---|
| asgiref | 3.7.2 |
| Django | 5.0.3 |
| joblib | 1.3.2 |
| mysqlclient | 2.2.4 |
| numpy | 1.26.4 |
| packaging | 23.2 |
| pandas | 2.1.4 |
| Pillow | 10.1.0 |
| pip | 24.0 |
| pyparsing | 3.1.1 |
| python-dateutil | 2.9.0.post0 |
| pytz | 2024.1 |
| scikit-learn | 1.3.2 |
| scipy | 1.12.0 |
| setuptools | 69.1.0 |
| six | 1.16.0 |
| sqlparse | 0.4.4 |
| threadpoolctl | 3.3.0 |
| tzdata | 2024.1 |
Feel free to reach out if you have any questions or encounter any issues.