Skip to content

Pyrefly does not resolve installed modules against the workspace venv in cell diagnostic vdocs #1014

Description

@seeM

A user ran into this issue with cell diagnostics.

Sharing a repro in case it's useful:

  1. Positron with a project that has a .venv containing dependencies not installed in the system/global Python (e.g., polars).
  2. System Python on PATH = Homebrew (here python@3.14), without polars.
  3. Open a .qmd with a cell that does import polars.

What I see: Pyrefly flags "Cannot find module 'polars'" and appears to resolve against the global Python rather than the project .venv.
python.defaultInterpreterPath, the interpreter picker, and QUARTO_PYTHON didn't change it.
Positron's own Pyrefly resolves the .venv fine, seems specific to the cell-diagnostics path.

Downgrading to 1.132.0 fixes it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingvscode

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions