MOIL app Installation Guide

This guide provides step-by-step instructions to install and run the MoilApp on Ubuntu and Windows with Python version greater than 3.7.

Clone This Repository

Use the "git clone" command to download the code from the repository to your local machine.

$ git clone https://github.com/perseverance-tech-tw/moilapp.git

Change the Working Directory

After successfully cloning the repository, change the working directory by using the command line below.

$ cd moilapp

Set up Virtual Environment

There are two ways to build a virtual environment: installing it generally or specifically for Python. Using the provided command helps to avoid installation errors and ensures that the dependencies required for each project are installed without interfering with other projects or the system's Python installation. A virtual environment is beneficial to developers in that it helps maintain project stability and avoids compatibility issues between package versions.

$ python3 -m venv venv

Note: you can change the python version ex: *python3.8, python3.9, python3.10

To start using the virtual environment, you need to activate it. You can do this by running the activate script located in the `bin` directory of your virtual environment. On Linux, use the following command:

$ source venv/bin/activate

Before installing the library requirements, you should upgrade an existing package PIP to the latest version. You can use the command.

$ pip install --upgrade pip

Followed by the name of the package, this command will download and install the latest version, replacing the older version that was previously installed.

With the environment activated, you can install all the required packages. These will be installed in the virtual environment and will not affect the global Python installation.

$ pip install -r requirements.txt

Run the Application

Once all is ready, run the main program in the ‘src’ directory. On your terminal, you can type the following command to run the project.</p>

$ cd src
$ python3 main.py