Confused about python version enforcement in sandbox
I am a bit confused at this warning message, I have defined a valid requires-python attribute yet this is happening.
On another front, is it incorrect to use sandboxes the way I am doing it? i.e. using
uv run
before the marimo call?8 Replies
Someone will reply to you shortly. In the meantime, this might help:
this warning might be coming from
uv
itself and not marimo. do you have a pyproject.toml
? you might need to add requires-python
Ah I see, in this case I don't have a pyproject.toml, I'm just running uv/marimo in a standalone folder (I simply have one marimo file with its sandboxed requirements), but it's a bit confusing regarding what python verxion/executable is actually being used in this case
In the same vein of confusion, how is best to add marimo extra dependencies to a sandboxed notebook? Should we just add
duckdb
rather than marimo[sql]
?
this is a bug on our end. but yea adding
duckdb
and polars
to the top header is recommended for now. ill fix thisi have a fixe here: https://github.com/marimo-team/marimo/pull/3425
GitHub
fix: handle marimo[extras] in --sandbox and package installation by...
This has a few fixes to be more resilient with --sandbox.
When installing marimo[sql] in the UI, we don't include the version (same as marimo)
When reading the deps from the notebook, we d...
That was so quick!! Thanks
I added a comment of a potential edge case
@Myles Scolnick in this case, if I have marimo as an inline dependency and I run
uvx marimo edit --sandbox nb.py
which marimo
installation will uv use? It would be whatever is available to the environment that uv
has access to, right? not the one in the sandbox? the user will always need marimo installed in the environment that uv
runs prior to running the sandbox?we will use the marimo version that was used to invoke
marimo edit --sandbox
so if you do uvx marimo
, uvx might cache what is has download or use the latest if its not foundOk good to know!!