Molab does not honor requires-python >=3.14 / cannot run Python 3.14 notebooks

Open
#11,142 0 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@akshayka is already working on this.

Since Oct 8, 2026.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
python

Research direction

Start by comparing how marimo's local sandbox uses uv to select Python from requires-python with how molab provisions its runtime; the issue does not name implementation files or tests. Done means molab either honors the notebook's Python 3.14 requirement or clearly communicates its supported runtimes and provides a selectable compatible runtime if available.

Written by the indexing model from the issue text.

Description

bug
Describe the bug
Description

It appears that molab currently runs notebooks using a fixed Python 3.13 environment, even when the notebook declares Python 3.14 through its inline dependency metadata.

The same notebook works correctly when run locally using marimo's sandbox environment, where uv provisions/selects Python 3.14 according to requires-python.

This prevents packages that legitimately require Python 3.14 from being used on molab.

Use case

We maintain the scientific Python package PyRITE:

https://github.com/Quantum-Light-Matter-Cooperative-QLMC/pyrite

PyRITE currently declares:

requires-python = ">=3.14"

The Python 3.14 requirement is intentional because PyRITE uses the new standard-library compression.zstd module introduced in Python 3.14.

We would like to use PyRITE from a marimo notebook hosted on molab.

Local behavior

When the notebook is opened locally using marimo's sandbox support, the Python requirement is honored and the notebook runs under Python 3.14.

For example:

marimo edit --sandbox notebook.py

Inside the notebook:

import sys
print(sys.version)

produces:

3.14.6 (main, Jul 18 2026, 17:01:31) [Clang 22.1.3 ]

and:

from compression import zstd

works normally.

Molab behavior

When the same notebook is uploaded/opened in molab, the runtime remains Python 3.13:

3.13.11 (main, Feb  3 2026, 03:08:54) [GCC 14.2.0]

Executable:

/tmp/uv-venv/bin/python

Trying to add PyRITE through uv subsequently fails because PyRITE requires Python >=3.14:

Using Python 3.13.11 environment at: /tmp/uv-venv
  × No solution found when resolving dependencies:
  ╰─▶ Because the current Python version (3.13.11) does not satisfy
      Python>=3.14 and pyrite-mc==0.4.0 depends on Python>=3.14, we can
      conclude that pyrite-mc==0.4.0 cannot be used.
      And because only pyrite-mc==0.4.0 is available and you require
      pyrite-mc, we can conclude that your requirements are unsatisfiable.

Changing the notebook/project requires-python setting to >=3.14 and restarting the molab session does not cause the runtime to switch to Python 3.14. Instead, it reverts the pyproject.toml requires-python entry to >=3.12.

Expected behavior

Ideally, molab would honor the notebook's requires-python declaration in the same way that marimo's local sandbox environment does.

For example, a notebook declaring:

# requires-python = ">=3.14"

would be provisioned with a compatible Python 3.14 interpreter.

Alternatively, if molab intentionally supports only a fixed set of Python runtimes, it would be helpful to:

  1. provide Python 3.14 as a selectable runtime, and/or
  2. clearly indicate that the notebook's requires-python declaration cannot change the molab runtime.
Why this matters

This is not just an overly restrictive package version constraint in our case. Python 3.14 introduced new standard-library functionality (compression.zstd) that our package uses, so running the package on Python 3.13 would require maintaining a separate compatibility implementation/dependency.

Because marimo itself supports Python 3.14 and the same notebook works through the local sandbox manager, it would be very useful for molab to support the same interpreter-selection behavior.

Will you submit a PR?
  • Yes
Environment

{
"marimo": "0.25.1",
"editable": false,
"location": "/usr/local/lib/python3.13/site-packages/marimo",
"OS": "Linux",
"OS Version": "4.19.0-gvisor",
"Processor": "",
"Python Version": "3.13.11",
"Locale": "C",
"Binaries": {
"Browser": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:157.0) Gecko/20100101 Firefox/157.0",
"Node": "v22.23.3",
"uv": "0.12.1 (x86_64-unknown-linux-gnu)"
},
"Dependencies": {
"click": "8.4.2",
"docutils": "0.23",
"itsdangerous": "2.2.0",
"jedi": "0.19.2",
"markdown": "3.10.2",
"narwhals": "2.24.0",
"packaging": "26.2",
"psutil": "7.2.2",
"pygments": "2.20.0",
"pymdown-extensions": "10.21.3",
"pyyaml": "6.0.3",
"starlette": "1.3.1",
"tomlkit": "0.15.1",
"typing-extensions": "4.16.0",
"uvicorn": "0.51.0",
"websockets": "16.1.1"
},
"Optional Dependencies": {
"altair": "6.2.2",
"anywidget": "0.11.0",
"duckdb": "1.5.4",
"loro": "1.13.1",
"nbformat": "5.10.4",
"openai": "2.46.0",
"pandas": "3.0.3",
"polars": "1.42.1",
"pyarrow": "25.0.0",
"pytest": "9.1.1",
"python-lsp-ruff": "2.3.1",
"python-lsp-server": "1.14.0",
"ruff": "0.15.22",
"sqlglot": "30.12.0",
"ty": "0.0.61",
"vegafusion": "2.0.3"
},
"Experimental Flags": {}
}

Code to reproduce
# /// script
# requires-python = ">=3.14"
# dependencies = [
#     "marimo>=0.25.1",
#     "pyrite-mc @ git+https://github.com/Quantum-Light-Matter-Cooperative-QLMC/pyrite.git",
# ]
# ///

import marimo

__generated_with = "0.25.1"
app = marimo.App()


@app.cell
def _():
    import sys
    print(sys.version)
    print(sys.executable)
    return


if __name__ == "__main__":
    app.run()
Dominant language
Python
Stars
22.9k
Forks
1.3k
Avg merge
1d 10h
Merged PRs (30d)
380

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from marimo-team/marimo

All issues in marimo-team/marimo

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.