gabriel
gabriel3w ago

should --sandbox with uv require manually reinstalling packages each time Marimo is restarted?

when running marimo edit --sandbox and installing packages with uv, i'm seeing a ModuleNotFound error and the missing packages pop-over each time the notebook is re-opened after marimo is restarted. is that expected? or should the packages be reinstalled automatically/persisted between runs? FWIW the package metadata is added to the top of the script
2 Replies
Myles Scolnick
It should not be. Sounds like a bug or edge case? What version of marimo and uv? Can you list what’s at the top of the file?
gabriel
gabrielOP3w ago
# /// script
# requires-python = ">=3.11"
# dependencies = [
# "marimo",
# "openai==1.52.2",
# "pydantic==2.9.2",
# ]
# ///

import marimo

__generated_with = "0.9.14"
app = marimo.App()
# /// script
# requires-python = ">=3.11"
# dependencies = [
# "marimo",
# "openai==1.52.2",
# "pydantic==2.9.2",
# ]
# ///

import marimo

__generated_with = "0.9.14"
app = marimo.App()
$ uv --version
uv 0.4.26
$ uv --version
uv 0.4.26
(ie all pretty up-to-date iiuc) (thanks for taking a look, sorry for delayed reply)