Thuta Learning
BasicData & Databasesintermediate

Python ML Environment Setup

Relax. We'll talk through this in plain words — no textbook voice.

What you'll walk away with

  • Understand Python ML Environment Setup, without any of the intimidation
  • Be able to run scikit-learn code yourself
  • Be able to apply this concept immediately in a real project

Let's think about it this way for a second

scikit-learn is Python's most widely used, beginner-friendly ML library — it provides a huge range of regression, classification, and clustering algorithms, all through a consistent API (the fit/predict pattern). Jupyter Notebook, meanwhile, is a development environment where you run code interactively cell by cell and see output (graphs, tables) immediately — it's used more than plain script files in data science/ML workflows, since you're constantly exploring and visualizing data while iterating.

Let's connect it to a real scenario

Run `pip install scikit-learn pandas numpy matplotlib jupyter`, then launch the browser-based notebook with the `jupyter notebook` command — you can write code in each cell and run it with Shift+Enter, and the output (dataframes, charts) will appear right below the cell.

Let's look at it together

bash
# Install the core ML stack
pip install scikit-learn pandas numpy matplotlib jupyter

# Launch Jupyter Notebook
jupyter notebook

# Verify scikit-learn is installed correctly
python -c "import sklearn; print(sklearn.__version__)"
You should see
$ python -c "import sklearn; print(sklearn.__version__)"
1.5.0

5-minute try-it

Install scikit-learn/Jupyter, then run `import sklearn; print(sklearn.__version__)` inside a Jupyter Notebook — make sure your setup is complete by getting a version number back.

A quick word of caution

Jupyter Notebook's 'cell execution order' won't necessarily match the layout order of cells in the notebook — running 'Restart & Run All' occasionally, to confirm the whole notebook works top-to-bottom, helps you avoid bugs.

Easy traps

  • Installing libraries directly into the system Python instead of using a virtual environment (venv/conda) — this can cause library version conflicts between different projects
  • Running Jupyter cells out of sequence instead of in order — this can leave variable state tangled up (e.g. running cell 5 before cell 2)

Now try it yourself

Install scikit-learn/Jupyter, then run `import sklearn; print(sklearn.__version__)` inside a Jupyter Notebook — make sure your setup is complete by getting a version number back.

You'll know it worked when: $ python -c "import sklearn; print(sklearn.__version__)" 1.5.0