AI Hints
Home›Machine Learning Tutorial›Workflow and Setup
Machine Learning · Lesson 5 of 85

Setting Up Your Tools

Python, notebooks, and libraries.

⏱ 2 min read▶ Video at 11:16🎓 Free
Watch this lesson in the Machine Learning courseWatch on YouTube ↗Full Machine Learning course

Nobody learns to swim by watching. You will learn machine learning by typing it. In the next few minutes, you will set up the same tools that professionals use, and they are all completely free.

Setting Up Your Tools
From the video: Setting Up Your Tools
  • You learn by typing
  • Professional tools
  • All of them free

Your toolkit

You need four things. Python, the language of machine learning. NumPy, for fast maths on numbers. Pandas, which handles tables, like a spreadsheet inside your code. And scikit learn, the library with nearly every classic algorithm, all behind the same simple commands. We will add matplotlib for charts. Together, these five tools can take you surprisingly far.

Pythonthe language
NumPyfast maths
pandastables of data
scikit-learnthe algorithms
matplotlibcharts

Installing everything

Here are the commands. First, make a folder for the course, and go inside it. Then create a virtual environment, which is a private box for this project's libraries, so that it never disturbs anything else on your computer. Activate it, and notice the change in the prompt. Finally, one pip install brings in all the tools. If you are on Windows, the activate command is slightly different, and you will find it in the description.

Terminal
mkdir ml-course && cd ml-course
python3 -m venv .venv
source .venv/bin/activate
pip install numpy pandas scikit-learn matplotlib jupyter
Successfully installed jupyter matplotlib numpy pandas scikit-learn

Check that it works

Let's prove that everything works. This little program imports each library, and prints its version. Run it. If you see a list of version numbers, and no errors, you are ready. Your numbers may be slightly newer than mine, and that is completely fine.

check_setup.pypython
import sys
import numpy, pandas, sklearn, matplotlib

print("Python      ", sys.version.split()[0])
print("NumPy       ", numpy.__version__)
print("pandas      ", pandas.__version__)
print("scikit-learn", sklearn.__version__)
print("matplotlib  ", matplotlib.__version__)
Output
Python       3.13.5
NumPy        2.5.4
pandas       3.1.0
scikit-learn 1.9.1
matplotlib   3.11.2

Summary

Your laptop is now a machine learning workstation. And remember, pause the video and type the code yourself. Reading code teaches you a little. Typing it teaches you a lot. Next, we meet the data that will follow us through this course.

Key takeaways
  • Python, NumPy, pandas, scikit-learn
  • A virtual environment keeps it tidy
  • Type the code yourself
Next up: Meet the Housing Data — twenty thousand real homes