Thanks to visit codestin.com
Credit goes to github.com

Skip to content

byuidatascience/uv_marimo_ds

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

UV + Marimo Data Science Environment

A simple repository that gets students up and running in a Marimo data science environment quickly using UV.

What You Get

  • Python 3.11+ managed by UV
  • Marimo - An interactive Python notebook environment
  • Essential Data Science Packages: pandas, numpy, matplotlib, seaborn, scikit-learn, plotly
  • One-line setup that works on both Windows and Mac OS

Quick Start

1. Install UV (One-time setup)

On Mac OS:

curl -LsSf https://astral.sh/uv/install.sh | sh

On Windows (PowerShell):

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

2. Download/Clone folder

Non-Git users

  1. Download this repository
  2. Unzip the zipped folder into your desired location

Git users

Fork this repository and clone it to your computer.

3. Run One-line start up

After installing UV and downloading/cloning the folder. Open a terminal in the respective folder and run this single command to start work:

uv run marimo edit example.py

If you would like to avoid the not quite errors that get printed you can run

./run_marimo.sh 

That's it! πŸŽ‰

What Just Happened?

When you ran uv run marimo edit example.py:

  1. UV automatically installed Python 3.11 (if not already present)
  2. UV created a virtual environment
  3. UV installed all required packages (marimo, polars, plotly, etc.)
  4. Marimo started and opened the example notebook in your browser

Working with the Environment

Running the Example Notebook

uv run marimo edit example.py

Creating a New Notebook

uv run marimo new my_notebook.py

Running a Notebook as an App

uv run marimo run example.py

Adding More Packages

To add more Python packages, edit pyproject.toml and add them to the dependencies list:

dependencies = [
    "marimo>=0.9.0",
    "pandas>=2.2.0",
    # Add your packages here
    "requests>=2.31.0",
]

Configuring your Marimo

What is UV?

UV is an extremely fast Python package installer and resolver, written in Rust. It's 10-100x faster than pip and manages Python versions automatically.

What is Marimo?

Marimo is a reactive Python notebook that:

  • Runs as an interactive web app
  • Automatically updates cells when dependencies change
  • Can be executed as a Python script
  • Is stored as pure Python (.py files)
  • Works great with version control (git)

Troubleshooting

UV Command Not Found (Mac/Linux)

After installing UV, restart your terminal or run:

source $HOME/.cargo/env

UV Command Not Found (Windows)

After installing UV, restart PowerShell. If still not working, you may need to add UV to your PATH.

πŸ“– See our detailed Windows PATH Setup Guide for step-by-step instructions.

Quick fix - Run this in PowerShell as Administrator:

$uvPath = "$env:USERPROFILE\.cargo\bin"
[Environment]::SetEnvironmentVariable("Path", [Environment]::GetEnvironmentVariable("Path", "User") + ";$uvPath", "User")

Then restart PowerShell.

Python Version Issues

UV will automatically install Python 3.11 as specified in .python-version. If you need a different version, edit that file.

Repository Structure

uv_marimo_ds/
β”œβ”€β”€ .python-version         # Specifies Python version (3.11)
β”œβ”€β”€ pyproject.toml          # Project dependencies and metadata
β”œβ”€β”€ example.py              # Example Marimo notebook
β”œβ”€β”€ README.md               # This file
└── WINDOWS_PATH_SETUP.md   # Windows PATH troubleshooting guide

Learning Resources

About

A simple repo that gets students up and running in a marimo environment quickly

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors