Skip to content

UV Python project is broken: No interpreter found for path #2575

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mskonovalov opened this issue Apr 8, 2025 · 4 comments
Open

UV Python project is broken: No interpreter found for path #2575

mskonovalov opened this issue Apr 8, 2025 · 4 comments
Labels
bug Something isn't working triage Issue needs triage

Comments

@mskonovalov
Copy link

What happened?

Works just fine in Devbox 0.13.6
But broken in 0.14.0

Info: Ensuring packages are installed.
✓ Computed the Devbox environment.
error: No interpreter found for path `.../.venv/bin/python` in managed installations or system path
Error: error running script "it-tests" in Devbox: exit status 2

The issue is I have a venv in the subfolder, but it always tries to look in the root of the project :(

Will try to prepare the reproduction example.

Likely related to #2478
#2411

cc @yemaney

Steps to reproduce

  1. Create a project with python venv inside subfolder
  2. try to run any command via UV
  3. see the error

Command

run

devbox.json

{
  "$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.13.7/.schema/devbox.schema.json",
  "packages": [
    "python@3.10",
    "uv@0.4.30"
  ],
  "shell": {
    "init_hook": [
      "alias cdt='cd src/packages/toolkit'",
      ". $VENV_DIR/bin/activate"
    ],
    "scripts": {
      "unit-tests": ["cdt", "uv run pytest -m unit \"$@\""],
      "it-tests": ["cdt", "uv run pytest -m integration \"$@\""]
    }
  },
  "env": {
    "VENV_DIR": "./src/packages/toolkit/.venv",
  }
}

Devbox version

0.14.0

Nix version

2.27.1

What system does this bug occur on?

macOS (Apple Silicon)

Debug logs

No response

@mskonovalov mskonovalov added bug Something isn't working triage Issue needs triage labels Apr 8, 2025
@mskonovalov
Copy link
Author

BTW is it possible to version plugins independently? So that you can pin specific python plugin version while still be able to update devbox?

@mskonovalov
Copy link
Author

here is the example repo https://git.1-hub.cnmskonovalov/devbox_bug
clone it and try to run devbox run it-tests
then you will see the following error

error: No interpreter found for path `/Users/kms/work/devbox_bug/.venv/bin/python` in managed installations or system path
Error: error running script "it-tests" in Devbox: exit status 2

Same result if you do

devbox shell
uv sync

@Riezebos
Copy link

Did you try adding "UV_PYTHON": "$PWD/.venv/bin/python" as fix mentioned in this comment on the linked issue? #2411 (comment)

@mskonovalov
Copy link
Author

I did, it does not help, still looking in the wrong place

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Issue needs triage
Development

No branches or pull requests

2 participants