-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Description
Summary
There seem to be cases in which uv sync is not able to resolve a project's environment while uv pip install does.
The following example was executed inside the ghcr.io/astral-sh/uv:python3.12-bookworm image.
With this pyproject.toml:
[project]
name = "teeeeest"
version = "0.1.0"
requires-python = ">=3.8,<3.9"
classifiers = []
dependencies = [
"tensorflow==2.12.0",
]uv sync fails to resolve because it decides to use tensorflow-io-gcs-filesystem==0.35.0, which has no compatible platforms.
But explicitly creating a pyhton 3.8 environment and then installing the dependency works:
uv venv --python 3.8 && uv pip install tensorflow==2.12.0
This time resolving to use tensorflow-io-gcs-filesystem==0.34.0.
Additionally, if now I try to help uv by explicitly listing tensorflow-io-gcs-filesystem==0.34.0 in the pyproject's dependencies, uv sync works without issues.
This seems like a bug to me, but in case I'm just misunderstanding the purpose of uv sync feel free to close this
Platform
Linux 5.15.153.1-microsoft-standard-WSL2 x86_64 GNU/Linux
Version
0.5.22
Python version
3.8.20