←back to thread

741 points chirau | 2 comments | | HN request time: 0.969s | source
1. codethief ◴[] No.44360535[source]
uv is great! One surprise I recently ran into, though, was that `uv run path/to/foo.py` doesn't look up the nearest pyproject.toml / .venv. Similarly, a script with a shebang `#!/usr/bin/env -S uv run` only executes correctly when executed from within the folder containing the .venv. Am I the only one finding this weird?
replies(1): >>44364567 #
2. bilbo-b-baggins ◴[] No.44364567[source]
I think the thought is to be obviously deterministic. It’s not exactly trivial to make those decisions for users since uv is not locked to its .venv - you may want the env, the system python, a pyenv, a brew python, or whatever variation can co-exist seamlessly.

I’d be surprised if there wasn’t an env var for it though.