astral-sh / uv

An extremely fast Python package and project manager, written in Rust.
https://docs.astral.sh/uv
Apache License 2.0
22.8k stars 661 forks source link

Failed to install: certifi-2024.8.30-py3-none-any.whl #7906

Open Pdsantos73 opened 1 week ago

Pdsantos73 commented 1 week ago

Trying to install fastapi "uv add fastapi[standard]" is showing the following error:

error: Failed to install: certifi-2024.8.30-py3-none-any.whl (certifi==2024.8.30) Caused by: failed to hardlink file from C:\Users\paulodo\AppData\Local\uv\cache\archive-v0\ez_A-yAgnUYbpxYugeHkX\certifi\py.typed to C:\Users\paulodo\OneDrive - Genesys Telecommunications Laboratories, Inc\DeveloperProject\Python\GenesysClould\middleware_a.venv\Lib\site-packages\certifi\py.typed Caused by: The cloud operation cannot be performed on a file with incompatible hardlinks. (os error 396)

zanieb commented 1 week ago

It looks like your cache is on a different file system than your project. Can you set UV_LINK_MODE=copy?

zanieb commented 1 week ago

cc @charliermarsh we might want a fallback for this specific error.

Pdsantos73 commented 1 week ago

Yes,

I included env variable but de issues persistes image

image

Pdsantos73 commented 1 week ago

I placed the variable with venv activated.

Pdsantos73 commented 1 week ago

I recently updated UV to the latest version. This problem only occurs in some dependencies.

Pdsantos73 commented 1 week ago

I'm using: Windows 11 uv 0.4.18 (7b55e9790 2024-10-01) Python 3.12.6

Pdsantos73 commented 1 week ago

I created a new project and managed to install it with the uv add "fastapi[standard]" --link-mode=copy

It worked!!

Thanks

charliermarsh commented 3 days ago

I sort of doubt we can react to this error specifically, unless it maps to a clear error kind on io::Error.