-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
uv --version
uv 0.5.1 (f399a5271 2024-11-08)
I executed the command uv add clickhouse-driver==0.2.9 and received the error message
Distribution clickhouse-driver==0.2.9 @ registry+https://my.site/api/pypi/simple can't be installed because it doesn't have a source distribution or wheel for the current platform.
I work on macos, but the project requires packages for linux as well. After execution command "uv add clickhouse-driver==0.2.9", the file uv.lock changed, linux packages were added to it, they were not installed for mac os because they were not added to my source. And at the same time, the clickhouse-driver has not been added to the hand, which means that I can no longer execute the command `uv remove clickhouse-driver'.
Result:
uv.lock:
[[package]]
name = "clickhouse-driver"
version = "0.2.9"
source = { registry = "https://my.site/api/pypi/simple" }
dependencies = [
{ name = "pytz" },
{ name = "tzlocal" },
]
wheels = [
{ url = "https://my.site/api/pypi/clickhouse_driver-0.2.9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:hash" },
{ url = "https://my.site/api/pypi/clickhouse_driver-0.2.9-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:hash" },
]
pyproject.toml:
[project]
name = "my-project"
requires-python = ">=3.11"
dependencies = [
]
uv remove clickhouse-driver:
error: The dependency clickhouse-driver could not be found in `dependencies
I think that if the version for the current OS is not detected, then it is necessary to immediately output an error before adding an entry to uv.lock. It would be correct to try to get the package version for the current OS in the first place.