Installation and setup
The setup for this course is one pinned set of libraries, pandas 3.0.6, NumPy 2.5.4, scikit-learn 1.9.1, matplotlib 3.11.2, seaborn 0.13.2, SciPy 1.18.1, imbalanced-learn 0.14.2 and openpyxl 3.1.5, installed on your own computer or skipped entirely by running the lessons on Google Colab.
Last updated: 12 Oct, 2026 · pandas 3.0 · scikit-learn 1.9
EDA and Feature Engineering described what the course builds. This lesson installs the stack it is built on. There are no API keys anywhere in the course and no dataset to download: every example reads its data over the network from a raw GitHub address.
Checking your Python version
The pinned stack needs Python 3.12 or newer, because NumPy 2.5 and SciPy 1.18 do not install on anything older. Open a terminal (PowerShell from the Start menu on Windows, the Terminal app on macOS) and ask Python for its version:
python3 --versionIf it prints 3.12 or higher you are set. If it prints 3.11 or lower, or the command is not found, either install a current Python from python.org (on Windows, tick Add python.exe to PATH in the installer), or take the uv route below, which downloads a suitable Python for the project by itself.
Installing the libraries
Pick one route. On your own computer prefer uv: it makes a project folder with its own environment, so these pinned versions never clash with other Python work. pip into your main Python is quicker to type. Colab needs no install. The versions are pinned so that the numbers you get match the numbers the lessons print; JupyterLab is left unpinned.
curl -LsSf https://astral.sh/uv/install.sh | sh
uv init eda-course --python 3.12
cd eda-course
uv add pandas==3.0.6 numpy==2.5.4 scikit-learn==1.9.1 matplotlib==3.11.2 seaborn==0.13.2 scipy==1.18.1 imbalanced-learn==0.14.2 openpyxl==3.1.5 jupyterlabWhat the uv route sets up
- The first line installs uv, a fast Python package manager. Open a new terminal afterwards so the
uvcommand is found. uv init eda-course --python 3.12creates the foldereda-coursewith apyproject.tomlthat lists the project's libraries, and pins the project to Python 3.12, downloading it if your computer does not have it.uv addcreates a private environment ineda-course/.venv, installs the libraries into it and records the exact versions inuv.lock.- Run code with
uv run, for exampleuv run python check_setup.py. There is no activation step.
What the pip and Colab routes do
python3 -m pip(orpy -m pipon Windows) installs into the same Python that thepython3command runs, which avoids installing into one Python and running another.- Colab ships older versions of pandas and scikit-learn, so its line installs every pin. After
%pip install, restart the session (Runtime, Restart session) and run your cells again, or the old pandas stays loaded.
Why the pinned pandas matters here
pandas 3.0 changed two things that this subject leans on, and both change results without raising an error. A lesson that runs on pandas 2 can print different numbers on pandas 3, and the other way round.
- Copy-on-write is permanent. A write reached through an intermediate object, such as
df['Age'].fillna(28, inplace=True), now lands on a temporary copy and is discarded. pandas warns and carries on, so a column you believe you filled still has its missing values. Copy-on-write and chained assignment shows it happening and turns the warning into an error. - Text has its own dtype. A column of strings is stored as
str, not asobject, so the old testdf[col].dtypes == 'O'is False for every text column in every dataset. Text columns and the str dtype follows one dataset through that test to theValueErrorit causes five steps later. - openpyxl is what reads
.xlsx. Two lessons read Excel files, andpd.read_excelneeds openpyxl installed. The oldxlrdengine dropped.xlsxsupport at version 2.0. - imbalanced-learn and SciPy are not optional extras. The imbalanced data part uses the first, and the Q-Q plot and Box-Cox lessons use the second.
Writing code in Jupyter or VS Code
The examples are short scripts and run the same way in a notebook cell or a .py file. A notebook suits this subject, because each chart and each head() appears under the cell that made it. Start JupyterLab from the project folder:
uv run jupyter labIn JupyterLab choose File, New, Notebook and pick the Python 3 kernel. To use VS Code instead, install its Python and Jupyter extensions, open the eda-course folder, and pick the interpreter with Python: Select Interpreter from the Command Palette, choosing the one in .venv for the uv route.
Checking the installed versions
Save this as check_setup.py in the project folder and run it with uv run python check_setup.py, python3 check_setup.py or py check_setup.py, or paste it into a notebook cell. The last line is the one that proves you are on pandas 3:
import sys
import imblearn, matplotlib, numpy, openpyxl, pandas as pd, scipy, seaborn, sklearn
print("Python ", sys.version.split()[0])
print("pandas ", pd.__version__)
print("numpy ", numpy.__version__)
print("scikit-learn ", sklearn.__version__)
print("matplotlib ", matplotlib.__version__)
print("seaborn ", seaborn.__version__)
print("scipy ", scipy.__version__)
print("imbalanced-learn", imblearn.__version__)
print("openpyxl ", openpyxl.__version__)
print("text dtype ", pd.Series(["Mumbai", "Delhi"]).dtype)Python 3.14.5 pandas 3.0.6 numpy 2.5.4 scikit-learn 1.9.1 matplotlib 3.11.2 seaborn 0.13.2 scipy 1.18.1 imbalanced-learn 0.14.2 openpyxl 3.1.5 text dtype str
Reading the version check
- Python 3.14.5 is what this install happens to run. Any 3.12 or newer prints its own number here and gives the same results.
- pandas 3.0.6 is the version behind every output in the course. A 2.x version here is the single most likely reason for a number that does not match.
- text dtype
stris the proof. On pandas 2 the same line printsobject, and the lessons that detect categorical columns behave differently. - A
ModuleNotFoundErroron any line means that library did not install, or the code is running under a different Python from the one it installed into.
Fixing a failed install
Most install problems print one of a few messages. Find yours:
python3: command not foundor'py' is not recognized: Python is not installed, or not on the PATH. Install it from python.org, ticking Add python.exe to PATH on Windows, or use uv, which brings its own Python.No matching distribution found for numpy==2.5.4, after a long list of older versions: the Python running pip is older than 3.12, so pip can only see older NumPy releases. Check the version as above, then use a 3.12 install oruv init --python 3.12.error: externally-managed-environment: this Python belongs to the operating system or to Homebrew, which blocks pip from changing it. Use the uv route, which installs into the project's own environment.ModuleNotFoundError: No module named 'sklearn': the package installs asscikit-learnand imports assklearn. In a uv project run the code withuv run; in VS Code select the.venvinterpreter.ValueError: Excel file format cannot be determinedor anImportErrornaming openpyxl when a lesson callspd.read_excel: openpyxl is missing from the install line.- A Colab cell still prints pandas 2.x: the session was not restarted after
%pip install. URLErrororHTTPErrorfromread_csv: the datasets are read over the network, so the first run of each example needs a connection.
uv vs pip vs Colab
| uv | pip | Colab | |
|---|---|---|---|
| Where it runs | Your computer | Your computer | Google's machines, from a browser |
| Install line | uv add ... inside a project | python3 -m pip install ... | %pip install ... in a cell |
| Keeps versions per project | Yes, in pyproject.toml and uv.lock | No, one shared Python | Per session, reinstall after a reset |
| Installs Python for you | Yes | No | Python is already there |
| Good for | Repeatable work | A quick start | No local install at all |
Where you use each route
- Following the lessons: any of the three. Every example runs with these eight libraries and no others.
- A dataset of your own: the uv route records the exact versions, so a colleague reproduces your numbers with
uv sync. - A locked work laptop: Colab runs everything on Google's machines, and a notebook there reads the same raw GitHub addresses.
pip install pandas can succeed while your notebook kernel keeps an older pandas loaded. Run the version check inside the same place you run the lessons, a notebook cell or a terminal, and trust what it prints over what the install said.Related
- Previous: EDA and Feature Engineering
- Next: The process, step by step
- Reference: Installing pandas, Installing scikit-learn and the uv documentation
- Add
print(pd.__version__ >= "3")to the check and confirm it printsTrue. - Run
import sklearn; sklearn.show_versions()to list every library scikit-learn depends on and the BLAS it found. - Change
pd.Series(["Mumbai", "Delhi"])topd.Series(["Mumbai", 7])and read the dtype it prints now.
Little by little, you're building something great.