-
Notifications
You must be signed in to change notification settings - Fork 798
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
Add support for pip download command or fix "Failed to download distributions" error message in offline mode #2078
Comments
The failed to download error is misleading, the error that renaming the file failed. Could you have the same problem about some corporate security software as in #1491 ? |
Thanks, yes that's a good guess, because the reason why I install from downloads is to get around our firewall. To check I ran the whole testcase fresh and it finished without an error. So uv can install from a folder. It would be nice to change the confusing error message (and to include pip's download flag) and maybe some needed retry logic. |
I am not sure the pip has the same mechanism of unziping a package and then nearly instantaneously trying to access the contents, perhaps this is a side effect of the speed of execution. My hunch is that simply retrying several times after the os send a read access error would resolve this particular issue at the expense of adding some complexity to the code for an issue that probably only effects an exceedingly small fraction of users |
I'd be fine with adding retry workarounds, but i'd need an environment to reproduce and test the fix. |
One work around that could help terminal users is an optional parameter that asks the user to confirm retries if uv decides that it has a file access error. I could test a fix attempt mid next week when I come in for an office workday. |
We have the same problem frequently on our Windows-based Gitlab runners.
|
I've tried downloading and installing downloaded files with uv (0.1.12 (f68b2d1 2024-02-28)) and it seems
that pip's download functionality is not fully supported.
My use case: I need to install Python packages offline or with internet access filtered from a USB stick.
With pip I can issue this command
and it will download all required files into a folder
I can then copy this folder to a target machine with filtered (or no) internet and run
and install.
The download command is not supported by uv.
The offline install syntax seems to work (I used pip to download)
but throws an error "Failed to download distributions" (when it shouldn't attempt downloads)
After installing with pip, the next run of uv works fine and reports
Testcase for Windows 10 to reproduce problem
On internet connected PC
On offline PC
The text was updated successfully, but these errors were encountered: