Data Science Ecosystem: Python, Jupyter, Colab & VS Code Setup

A professional data scientist requires a robust, reproducible, and high-performance computing environment. In this class, we walk through configuring a production-grade Python workstation using VS Code, JupyterLab, Google Colab, and modern package management tools (UV and virtual environments).

The Modern 2026 Python Data Stack Hierarchy

The Python data science ecosystem is layered from low-level compiled hardware drivers up to high-level interactive visualization libraries:

Layer Key Libraries Role in Workflow
Compute & Math NumPy, SciPy, Numba N-dimensional C-arrays, BLAS/LAPACK matrix routines, vectorization.
Data Wrangling Pandas 2.x, Polars, DuckDB Tabular DataFrame manipulation, filtering, aggregation, and Arrow memory.
Visualization Matplotlib, Seaborn, Plotly Publication-quality charts, exploratory plots, and interactive dashboards.
Machine Learning Scikit-learn, XGBoost, LightGBM Feature transformers, cross-validation, ensemble classification & regression.
Serving & Production FastAPI, Streamlit, Docker REST microservices, web apps, and containerized deployment pipelines.

Setting Up an Isolated Virtual Environment

Never install data science packages into your global operating system Python installation. Always create an isolated workspace:

# Step 1: Create a dedicated project directory
mkdir veewom-datascience-lab && cd veewom-datascience-lab

# Step 2: Initialize a modern isolated virtual environment
python -m venv .venv

# Step 3: Activate the virtual environment
# On Windows (PowerShell):
.\.venv\Scripts\Activate.ps1
# On macOS / Linux:
source .venv/bin/activate

# Step 4: Upgrade pip and install core scientific libraries
python -m pip install --upgrade pip
pip install numpy pandas polars scipy scikit-learn matplotlib seaborn plotly jupyterlab ipykernel

Configuring Jupyter Kernel in VS Code

VS Code offers the best of both worlds: full IDE capabilities (Git, auto-complete, terminal, linting) combined with native interactive Jupyter Notebook (.ipynb) rendering. To register your virtual environment as an accessible Jupyter kernel, run:

python -m ipykernel install --user --name=veewom-ds --display-name="Python (Veewom Data Science)"

Now, whenever you open an .ipynb notebook in VS Code, click on the kernel selector in the top-right corner and select "Python (Veewom Data Science)". This ensures all your installed dependencies are resolved properly without path collisions.

Google Colab: Cloud Computing & Free GPU Acceleration

When working on heavy datasets or deep learning models that exceed local workstation RAM, Google Colab offers instant zero-configuration environments with free NVIDIA T4/A100 GPU acceleration. Essential Colab keyboard shortcuts and verification commands:

# Run in Colab cell to verify environment specs
import sys
import torch
import psutil

print(f"Python Version: {sys.version}")
print(f"RAM Available: {psutil.virtual_memory().total / (1024**3):.2f} GB")
print(f"GPU Available: {torch.cuda.is_available()}")
if torch.cuda.is_available():
    print(f"GPU Device: {torch.cuda.get_device_name(0)}")

Student Exercise: Environment Verification

Create a test script named verify_stack.py. Import numpy, pandas, polars, and sklearn, and print their __version__ strings. Run the script from your activated virtual environment to confirm all binary wheels are correctly compiled.

Frequently Asked Questions (FAQ) - Student & Interview Review

Q1. What is the best Python version for Data Science in 2026?

Python 3.11 or Python 3.12 is recommended. These versions provide substantial bytecode execution speedups, enhanced error tracebacks, and complete compatibility with modern libraries like NumPy 2.x, Pandas 2.x, Polars, and PyTorch.

Q2. Why should I use UV or Conda instead of plain pip?

Traditional pip can encounter dependency resolution conflicts when managing complex C/Fortran/Rust scientific binary wheels. UV (built in Rust) offers 10-100x faster package installation and deterministic lockfiles, while Conda provides robust isolated environments for non-Python binary dependencies.

Q3. When should I use Google Colab vs local VS Code?

Google Colab is ideal for collaborative research, zero-setup experimentation, and leveraging free cloud GPUs/TPUs for deep learning. VS Code is preferred for building production-grade software repositories, writing modular scripts (.py), version control with Git, and debugging microservices.

Q4. What is the role of Jupyter Notebooks in Data Science?

Jupyter Notebooks provide an interactive Read-Eval-Print Loop (REPL) environment where code cells, markdown explanations, mathematical equations, and rich graphical charts sit side-by-side, making it the global standard for exploratory data analysis and sharing findings.

Q5. How do I prevent 'dependency hell' in data science projects?

Always create an isolated virtual environment per project using `python -m venv .venv` or `uv venv`. Maintain a locked dependency manifest using `requirements.txt` or `pyproject.toml` to ensure reproducibility across machines.

Explore Related Data Science Tutorials & Next Steps

Broaden your statistical analysis, Python data wrangling, and production engineering expertise:

Modern Data Science Lifecycle & CRISP-DM

Understand how toolchains support each phase of the data science lifecycle.

NumPy Mastery: Vectorization & Arrays

Deep dive into NumPy arrays, broadcasting rules, and high-performance computing.

Polars: Lightning-Fast DataFrame Engine

Accelerate your data manipulation pipelines using Rust-powered Polars.

Serving Data Science APIs with FastAPI

Transition from Jupyter notebooks to production microservices and REST APIs.

Share Share on Facebook Share on Twitter Share on LinkedIn Pin on Pinterest Share on Reddit

You may also like this!