Skip to content

[19.10] When using uv projects, dependencies are not added to pyproject.toml #8277

@MathiasBuus

Description

@MathiasBuus

Describe the bug

When installing packages via marimo with uv configured as the package manager - the packages are not added to the uv project, but only installed inside the .venv.

Reproduce:

  1. uv init marimo-test
  2. cd marimo-test
  3. uv add "marimo[recommended]"
  4. uv run marimo edit
  5. Create new notebook
  6. Create import statement using a package not in environment. eg. "import pyproj"
  7. Run cell and install package using uv
  8. Notice that pyproj dependency is not in pyproject.toml or uv.lock
  9. Notice that pyproj is insidde .venv/Lib folder

Will you submit a PR?

  • Yes

Environment

Details
{
  "marimo": "0.19.10",
  "editable": false,
  "location": "C:/Users/MathiasBrochdorffBuu/Documents/Github/sensordata/marimo-test/.venv/Lib/site-packages/marimo",
  "OS": "Windows",
  "OS Version": "11",
  "Processor": "Intel64 Family 6 Model 186 Stepping 3, GenuineIntel",
  "Python Version": "3.13.0",
  "Locale": "--",
  "Binaries": {
    "Browser": "142.0.7444.135",
    "Node": "v22.14.0",
    "uv": "0.10.2 (a788db7e5 2026-02-10)"
  },
  "Dependencies": {
    "click": "8.3.1",
    "docutils": "0.22.4",
    "itsdangerous": "2.2.0",
    "jedi": "0.19.2",
    "markdown": "3.10.2",
    "narwhals": "2.16.0",
    "packaging": "26.0",
    "psutil": "7.2.2",
    "pygments": "2.19.2",
    "pymdown-extensions": "10.20.1",
    "pyyaml": "6.0.3",
    "starlette": "0.52.1",
    "tomlkit": "0.14.0",
    "typing-extensions": "4.15.0",
    "uvicorn": "0.40.0",
    "websockets": "16.0"
  },
  "Optional Dependencies": {
    "altair": "6.0.0",
    "duckdb": "1.4.4",
    "loro": "1.10.3",
    "nbformat": "5.10.4",
    "openai": "2.20.0",
    "polars": "1.38.1",
    "pyarrow": "23.0.0",
    "ruff": "0.15.0",
    "sqlglot": "28.6.0"
  },
  "Experimental Flags": {}
}

Code to reproduce

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions