Documentation

Installation Guide

Fantasy XI Optimizer Machine Learning Final Year Project with Source Code (Flask + Python)

Step-by-step Setup Verified Instructions Chat Support
Back to Project
Complete Guide

Setting This Up (roughly 15 minutes)

No Docker, no cloud account, no database server. It's a Flask app that reads a CSV and two pickle files. If you can run one command in a terminal, you can run this.

Before You Start

  • Python 3.10 or higher. Grab it from python.org. During the Windows installer there's a checkbox at the bottom that says "Add Python to PATH" — tick it. People skip that box and then spend an hour wondering why the terminal doesn't recognise the word python.
  • pip. Comes bundled with Python. Check it exists by running pip --version.
  • A code editor. VS Code is free and fine.
  • About 500MB of free disk space and any laptop from the last six years.

Step 1 — Extract and open the folder

Unzip what you downloaded. You'll see a folder called FIFA 2026 Player Performance containing app.py, two .pkl files, a CSV, a notebook, and static plus templates directories. Open a terminal inside that folder — in VS Code it's File then Open Folder, then Terminal then New Terminal.

Step 2 — Make a virtual environment

Skippable but don't skip it. It keeps this project's libraries away from everything else on your machine.

python -m venv venv

Then activate it. Windows:

venv\Scripts\activate

Mac or Linux:

source venv/bin/activate

You'll know it worked when (venv) shows up at the start of your terminal line.

Step 3 — Install the libraries

pip install flask pandas numpy scikit-learn plotly pulp joblib

Takes two or three minutes on decent wifi. scikit-learn is the big one. Let it finish.

Step 4 — Run it

python app.py

Flask will print a few lines and tell you it's serving on http://127.0.0.1:5001. Leave that terminal window open. Closing it kills the server.

Step 5 — Open the browser

Go to http://127.0.0.1:5001. The home page should load with the dark gradient hero and the counters ticking up. Click through to /predictor, pick a player, and confirm you get a number back. Then go to /optimizer, set the budget somewhere around €200M, pick 4-3-3, and hit optimize. If eleven names come back in a table with a bar chart, everything's working.

When It Breaks

"ModuleNotFoundError: No module named 'pulp'"

Your virtual environment isn't active, or you installed the packages before creating it. Look for (venv) in your terminal. If it isn't there, activate it and run the pip install line again.

"Address already in use" or the page won't load

Something else has taken port 5001. Open app.py, scroll to the bottom, find the line with app.run, and change 5001 to 5050. Restart and go to http://127.0.0.1:5050 instead.

Charts show up as empty white boxes

Plotly loads from a CDN, so this is almost always an internet problem. Refresh once. If your college lab blocks CDNs, download plotly.min.js, drop it in static/js, and swap the CDN script tag in templates/base.html for a local reference. Do this before demo day.

Pickle version warning in the terminal

If your scikit-learn version is newer than the one used to train the model, you'll see a yellow InconsistentVersionWarning. The app still runs. If you want it gone, run pip install scikit-learn==1.3.2, or just open the training notebook and retrain — it takes a couple of minutes and produces a fresh .pkl matching your version.

Quick Check Before Your Demo

Run through all six pages the night before: home, about, analytics, predictor, optimizer, contact. Try three different budget and formation combinations on the optimizer, because a very low budget with a demanding formation can occasionally return no feasible solution and you don't want to discover that live. Screenshot everything while it's working. Screenshots have saved more vivas than working code has.

Need Help?

Our team is here to assist you with installation and setup.

Chat with Us