This content originally appeared on DEV Community and was authored by Tarun Kumar
If youβre starting your journey in Python, Data Science, or Machine Learning, chances are youβve already heard about Jupyter.
But hereβs the harsh reality most beginners face:
- Most tutorials skip best practices
- Beginners often get lost between Jupyter Notebook vs JupyterLab
- Wrong installs β broken projects later
Example: You finally set up Jupyter, write some code, share it with a teammate⦠and boom it breaks on their system. Why ?
This guide will walk you through the right way to install, organize, and run Jupyter β so your projects stay clean, scalable, and production-ready.
What Exactly is Jupyter?
Think of Jupyter Notebook as a coding workspace β like VS Code, Sublime, or Vim β but designed for Python + Data Science.
It lets you:
- Write and run Python code in small chunks (cells)
- Add markdown notes alongside your code
- Visualize data instantly
And now, thereβs JupyterLab: a polished upgrade with a nicer interface and extra features.
But donβt worry β 90% of your work will look the same in both.
The Problem With Most Jupyter Users
Hereβs where things usually go wrong:
- Installing Jupyter globally β breaks dependencies across projects
- Confused: Notebook or Lab?
- Dumping all code into one messy notebook
- Following random tutorials without learning best practices
Thatβs why weβll do it the pro way: clean, isolated, and VS Code-friendly.
Step 1: Create a Virtual Environment
Never install Jupyter globally. Instead, create a virtual environment inside your project folder.
# create a folder for your project
mkdir J_Books && cd J_Books
# create virtual environment
python3 -m venv venv
Activate it:
# Mac/Linux:
source venv/bin/activate
# Windows:
venv\Scripts\activate
Once activated, your terminal will show (venv) β meaning everything you install stays inside this project only.
Step 2: Install Jupyter
With your virtual environment active:
pip install jupyterlab
(If you prefer the classic interface, install just jupyter instead.)
Launch it with:
jupyter lab
This will open Jupyter in your browser, where you can create notebooks, terminals, or text files.
Warning:
Ifjupyter lab
doesnβt open automatically in your browser, just go tohttp://localhost:8888
Step 3: Use Jupyter in VS Code
If youβre already comfortable with VS Code, you can run notebooks there too:
- Open VS Code
- Drag your project folder (J_Books) into it
- Install the Jupyter extension from the VS Code marketplace
Now you can create and run .ipynb files directly inside VS Code, with all the editor perks β themes, shortcuts, autocomplete, and version control.
Summary
Letβs recap the pro Jupyter setup:
- Always use a virtual environment (venv or Conda)
- Install Jupyter (jupyterlab for modern UI, jupyter for classic)
- Run it either in the browser or inside VS Code
This way:
- Your projects stay organized
- Dependencies donβt conflict
- Moving to production is much smoother
Final Thoughts
Jupyter is one of the most powerful tools in Data Science β but only if you set it up the right way.
Start clean. Work in isolated environments. Use the editor that feels best for you.
Your future self (and your projects) will thank you.
Are you using Jupyter Notebook or JupyterLab right now? Drop your workflow in the comments β letβs learn from each other!
This content originally appeared on DEV Community and was authored by Tarun Kumar