uv run --python 3.11 --with marimo --with numpy --with matplotlib marimo edit --sandbox hi.py
uv run --python 3.13 --with jupyterlab --with numpy --with matplotlib jupyter lab
echo "pandas" > requirements.txt uv run --with marimo --with-requirements "requirements.txt" marimo edit --sandbox hi.py
--with-requirements
anywhere in the docs uv add --script hi.py pandas matplotlib numpy uv run --with marimo marimo edit --sandbox hi.py
uvx marimo edit --sandbox hi.py
would be the way to go then?uv tool
/ uvx
(uvx
is a shorthand for uv tool
) supports having multiple installations of the tool across multiple Python versions. Your feedback and experiments are helpful, we're still learning best practices of how to use uv
uvx
is a shorthand for uv tool run
:marimo
via uvx marimo edit --sandbox marimo_uv.py
and I get the message ther there's an update available to marimo 0.9.8
.pip install marimo
, but I guess it will be uv pip install --upgrade marimo
?uv tool install marimo --upgrade
?Can you specific this with an environment variable?
UV_PYTHON=python3.11
instead of using the CLI flag: https://docs.astral.sh/uv/configuration/environment/UV_PYTHON=python3.11 uv tool install marimo
marimo edit hi.py
UV_PYTHON=python3.13 uv tool install marimo
marimo edit hi.py
to use python3.13UV_PYTHON=python3.13 uvx marimo edit hi.py
uvx --python 3.13 marimo edit hi.py
, wich is maybe a bit cleaner.uvx --python 3.13 marimo edit hi.py and UV_PYTHON=python3.13 uvx marimo edit hi.py
uv tool install marimo
UV_PYTHON=python3.11 uv tool install marimo
(this will overwrite the previous global installation)uv tool install marimo --upgrade
.marimo edit hi.py --sandbox
marimo edit hi.py
uvx marimo edit --sandbox hi.py
uv tool run marimo edit --sandbox hi.py
uvx --python 3.13 marimo edit hi.py
uv cache clean
will remove all artifacts from my system that were cached with uvx before.uv venv uv pip install marimo uv run marimo edit hi.py
source .venv/bin/activate
and then marimo can be started via marimo edit hi.py
.which marimo
and it will show me the file path.uv init (this will create a pyproject.toml file) uv add marimo (this will add "marimo>=0.9.9" to dependencies in pyproject.toml) uv run marimo edit hi.py
Can we use global marimo with a custom venv?I'm really interested in that question as well!
--sandbox
is if one is already using uv for everything?uv tool install
/ "why not globally install it? It’ll save you 4 keystrokes each time")uv run --with marimo --with torch marimo edit
uv init . uv add marimo torch uv run marimo edit
import numpy
)--sandbox
argument to edit? (aside: pip is selected as the default for some reason?)uv run
should be (aka the first example I described)uvx --python 3.11 marimo edit --sandbox /tmp/toy.py Installed 24 packages in 148ms Running in a sandbox: uv run --isolated --no-project --with-requirements /var/folders/kt/5fbzpd0j197d08q5bbft193m0000gn/T/tmp5f64x147.txt --python >=3.12 marimo edit /tmp/toy.py
uvx --python 3.11 marimo edit --sandbox /tmp/t.py # Ctrl + C cat /tmp/t.py
$ uvx --python 3.11 marimo edit --sandbox /tmp/t.py 15:54:15 Running in a sandbox: uv run --isolated --no-project --with-requirements /var/folders/kt/5fbzpd0j197d08q5bbft193m0000gn/T/tmpxbb77g76.txt --refresh marimo edit /tmp/t.py Installed 24 packages in 60ms Edit t.py in your browser :pencil: ➜ URL: http://localhost:2719?access_token=gPJZayU_EuNqQBgc81nF9Q Are you sure you want to quit? (y/n): y Thanks for using marimo! :ocean::leaves: (ml_pipelines) ➜ /Users/lucharo/Projects/ml_pipelines git:(rnd-autogluon) ✗ VPN ✓ $ cat /tmp/t.py 15:54:23 # /// script # requires-python = ">=3.12" # dependencies = [ # "marimo", # ] # ///