AI-Powered Pest Detection & Pesticide Recommendation System - Final Year Project with Source Code
Back to ProjectWindows Key + Rcmd and press Enter
python --version
You should see something like: Python 3.11.x
Also verify pip:
pip --version
Option A: Using Git
cd C:\Users\YourUsername\Documents
git clone [repository-url]
cd pest-detection-system
Option B: Using ZIP File
C:\Users\YourUsername\Documents)
cd C:\Users\YourUsername\Documents\pest-detection-system
python -m venv venv
Activate the virtual environment:
venv\Scripts\activate
You should see (venv) at the beginning of your command prompt line
pest_model.pth and the dataset filesmodels folder in your project directory:
mkdir models
pest_model.pth file to the models folder
pip install -r requirements.txt
This may take several minutes. Wait for all packages to install.
python main.py
You should see output indicating the server is running:
* Running on http://127.0.0.1:5001
http://localhost:5001To access the administrative dashboard:
To stop the server:
Ctrl + Cdeactivate to exit the virtual environment
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Option A: Using Homebrew (Recommended)
brew install python@3.11
Option B: Download from Python.org
In Terminal, run:
python3 --version
pip3 --version
Option A: Using Git
brew install git
cd ~/Documents
git clone [repository-url]
cd pest-detection-system
Option B: Using ZIP File
cd ~/Documents/pest-detection-system
python3 -m venv venv
Activate the virtual environment:
source venv/bin/activate
You should see (venv) at the beginning of your terminal prompt
pest_model.pth and dataset files
mkdir -p models
mv ~/Downloads/pest_model.pth ./models/
pip3 install -r requirements.txt
Wait for all packages to download and install
python3 main.py
Look for the message:
* Running on http://127.0.0.1:5001
http://localhost:5001Control + Cdeactivate to exit virtual environment
sudo apt update
sudo apt upgrade -y
sudo apt install python3 python3-pip python3-venv git -y
python3 --version
pip3 --version
git --version
Option A: Using Git
cd ~/Documents
git clone [repository-url]
cd pest-detection-system
Option B: Using ZIP File
cd ~/Documents
unzip pest-detection-system.zip
cd pest-detection-system
python3 -m venv venv
Activate virtual environment:
source venv/bin/activate
mkdir -p models
mv ~/Downloads/pest_model.pth ./models/
pip3 install -r requirements.txt
python3 main.py
Open browser and navigate to: http://localhost:5001
sudo dnf update -y
sudo dnf install python3 python3-pip python3-virtualenv git -y
The remaining steps are identical to the Ubuntu installation process above
sudo pacman -Syu
sudo pacman -S python python-pip python-virtualenv git
The remaining steps are identical to the Ubuntu installation process
Ctrl + C in the terminaldeactivate to exit virtual environmentSolution:
C:\Python311)Solution:
On Linux/macOS, use pip3 instead of pip:
pip3 install -r requirements.txt
Solution:
Don't use sudo with pip inside a virtual environment. Make sure virtual environment is activated:
source venv/bin/activate
Solution:
pip install -r requirements.txt --force-reinstall
Solution:
Windows:
netstat -ano | findstr :5001
taskkill /PID [PID_NUMBER] /F
Linux/macOS:
lsof -ti:5001 | xargs kill -9
Solution:
pest_model.pth is inside the models folder
chmod 644 models/pest_model.pth
Solution:
Use a different pip mirror:
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
Windows:
If you get an execution policy error, run PowerShell as Administrator and execute:
Set-ExecutionPolicy RemoteSigned
Then try activating again:
venv\Scripts\activate
Linux/macOS:
Make sure activation script is executable:
chmod +x venv/bin/activate
source venv/bin/activate
Solution:
127.0.0.1:5001 instead of localhost:5001Solution:
If you encounter issues not covered here:
Our team is here to assist you with installation and setup.