Skip to content
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

uv run output mentions .python-version file, but none is present #10614

Closed
thedch opened this issue Jan 14, 2025 · 2 comments
Closed

uv run output mentions .python-version file, but none is present #10614

thedch opened this issue Jan 14, 2025 · 2 comments
Labels
question Asking for clarification or support

Comments

@thedch
Copy link

thedch commented Jan 14, 2025

❯ ls .python-version .venv pyproject.toml
ls: .python-version: No such file or directory
ls: .venv: No such file or directory
ls: pyproject.toml: No such file or directory

❯ uv run test.py
Reading inline script metadata from `test.py`
warning: The Python request from `.python-version` resolved to Python 3.11.11, which is incompatible with the script's Python requirement: `>=3.12`
2.30.0

❯ cat test.py
# /// script
# requires-python = ">=3.12"
# dependencies = [
#     "open_clip_torch",
# ]
# ///

import open_clip

print(open_clip.__version__)

❯ uv version
uv 0.5.18 (Homebrew 2025-01-11)

❯ find . | grep version | wc -l
       0

Why is uv mentioning a .python-version file? Is it looking in some other directory as well?

@zanieb
Copy link
Member

zanieb commented Jan 14, 2025

We read .python-version files from parent directories, unless you're in a project — in which case we will not go beyond the project bounds.

@thedch
Copy link
Author

thedch commented Jan 14, 2025

Oh, gotcha, thanks!

@thedch thedch closed this as completed Jan 14, 2025
@zanieb zanieb added the question Asking for clarification or support label Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Asking for clarification or support
Projects
None yet
Development

No branches or pull requests

2 participants