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

Error when adding a non-existent version for the current OS #9028

Closed
genchik1 opened this issue Nov 11, 2024 · 1 comment · Fixed by #9030
Closed

Error when adding a non-existent version for the current OS #9028

genchik1 opened this issue Nov 11, 2024 · 1 comment · Fixed by #9030
Assignees
Labels
bug Something isn't working

Comments

@genchik1
Copy link

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.

@charliermarsh
Copy link
Member

I see, so you're saying we modify the lockfile but then we revert the pyproject.toml? So at the end, clickhouse-driver is in the lockfile but not the pyproject.toml?

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

Successfully merging a pull request may close this issue.

2 participants