Generally we use VS Code as our code editor and the uv command-line tool to manage both Python installation and depencencies (e.g. installing pandas, altair, etc.).
Below is an overview of how to set up a new Python project where you plan to use Jupyter.
IMPORTANT: Make sure to first install VS Code extensions for Jupyter and Python
Note, the below workflow builds on these instructions from the uv user manual.
The following instructions assume you're using VS Code and the
uvcommand-line tool.
On the command line or terminal shell, navigate to the folder where you'd like to create your Python project.
Run the following commands:
# Create a new Python project
# (replace "my-python-project" with an appropriate name, obv)
uv init my-python-project
# Navigate to the new folder
cd my-python-project
# Add the Jupyter kernel to the project
uv add --dev ipykernel
# Add any other libraries you need. For example:
uv add pandas altairThere are a few ways to open the project in VS Code.
From the command line, you can try one of the below options:
code .
# OR, if above doesn't work, try:
vscode .Or you can simply open VS Code by clicking its icon in Applications or doing a Spotlight search, and then opening the newly created project folder.
Once your project is open in VS Code:
-
Go to the left side navigation
-
Select the file
Explorerarea (top left button) -
Click the New File button
A new file should appear in the Explorer.
Name the file, making sure it ends with the .ipynb extension.
Open the newly created Jupyter notebook and perform the following steps to link the notebook to the version of Python (and ipykernel) you installed earlier with uv.
- Go to the upper right corner
- Click
Select kernel - Choose
Python Environments
Now choose the Python kernel installed by uv when you first set up the project.
Typically this will be named something like
.venv/bin/pythonwith an indication of the specific Python version in parentheses:
To verify that everything is set up correctly, try importing a library that you installed with uv.
For example, in a notebook cell -- make sure it's a code cell, not markdown -- try importing pandas and executing/running the cell.
import pandas as pdIf you see a green check mark, you're all good.


