Python cells.
Orchid ships its own Python and gives every project its own virtual environment. You write, you run — no separate install, no juggling versions.
Bundled Python, per-project venv
Each Orchid install includes a known-good CPython build. When you open a project for the first time, Orchid creates a virtual environment inside it. Every Python cell runs in that venv. Different projects get different venvs, so installing pandas 2.2 in one project doesn't touch another.
Check the active Python version from the bottom-left of the window, or programmatically:
import sys
print(sys.version)
print(sys.executable)Installing packages
The fastest path is the Packages panel: type a name, click install. Orchid runs pip install inside the project's venv and pins the version in your project's requirements file.
You can also install from a code cell with the magic prefix:
%pip install duckdb pyarrow%pip always targets the active venv, even when the kernel and the project venv get out of sync. Prefer it over a shell pip.
After installing a package, you don't need to restart the kernel for fresh imports — but if you upgrade a package that's already imported, restart so the new module loads.
Imports & module discovery
The project root is on the Python path, so you can import any .py file alongside your notebook directly. Sub-folders with an __init__.py work too.
# In ./utils/cleaning.py
def normalize(df):
return df.dropna().reset_index(drop=True)
# In a notebook cell
from utils.cleaning import normalize
clean = normalize(df)Variables across cells
All Python cells share one kernel per notebook. Anything you assign in a cell stays in scope for cells below — including DataFrames returned by SQL cells. Cells above can also use the variable as long as you re-run them after it's defined.
The Variables tab in the bottom panel lists everything currently in scope with its type and size. Click a row to peek; double-click to expand a DataFrame in the full result viewer.
Errors & tracebacks
Failures show inline below the cell with a syntax-highlighted traceback. Click any frame in the traceback to jump to that line — even when it's in another cell, another file, or a library install path.
Use %debug in a fresh cell after a crash to drop into a post-mortem PDB session right in the notebook. Variables panel stays useful inside debug mode.
Async & long-running cells
Top-level await works — no need to wrap things in asyncio.run. For cells that run for a while, the run badge keeps a live timer. Hit Stop to interrupt; the kernel raises a KeyboardInterrupt on the current frame so partial state is preserved.
Back to Cells & blocks, on to SQL cells, or jump to the Notebooks overview.