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

pip cannot resume downloads #3128

Closed
prophile opened this issue Sep 22, 2015 · 12 comments
Closed

pip cannot resume downloads #3128

prophile opened this issue Sep 22, 2015 · 12 comments
Labels
auto-locked Outdated issues that have been locked by automation type: enhancement Improvements to functionality

Comments

@prophile
Copy link

If a download is interrupted half way through, there is no way to continue the download in a subsequent pip run; it'll start each download afresh.

For those like me unlucky enough to have long commutes with intermittent internet, it's painful.

@xavfernandez xavfernandez added the type: enhancement Improvements to functionality label Oct 20, 2015
@dstufft
Copy link
Member

dstufft commented Mar 24, 2017

Closing this, I don't believe the benefit outweighs the cost of implementing this. We would accept a PR for it, but I don't believe tracking the issue to be valuable.

@dstufft dstufft closed this as completed Mar 24, 2017
@Minthos
Copy link

Minthos commented Dec 17, 2017

I'm struggling with this. I moved to a country with shitty internet and I'm trying to download a massive 170 MB package. Is it possible to download the file manually with wget and get pip to use the downloaded file instead of trying to download a new one?

@pradyunsg pradyunsg reopened this Dec 17, 2017
@pradyunsg
Copy link
Member

@Minthos Yes. You can download a distribution manually and just give pip the path to the downloaded file and it'll install it.

pip install /path/to/my-large-file.tar.gz

@Minthos
Copy link

Minthos commented Dec 18, 2017

pip install /path/to/my-large-file.tar.gz

I have confirmed it works. Thank you.

@ghost
Copy link

ghost commented May 23, 2018

Qt's "pyside2" package is offered via download.qt.io which limits download speed to ~50kb/s (it seems it does that server-side!) and the package is ~100MB. This means a download of 30-60 minutes people need to start all over if there's just a minor hiccup.

The former-disney-now-open-source 3d engine project panda3d (python 3d engine) is similarly huge and changing its default install method to pip - I assume this might cause similar problems.

Is there any chance this might be revisited? I think this may be a bigger problem for a subset of your users than you might realize...

@pradyunsg
Copy link
Member

@Jonast Hi!

Honestly, unless someone finds the time to implement this and submit the PR, I doubt that this is going to happen any time soon.

@CTimmerman
Copy link

CTimmerman commented Jun 28, 2018

@pradyunsg How would one do that? And does it make sense to work on a closed issue? The simplest option for me is to keep hammering pythonhosted.org until pip succeeds at installing Qt5.

As FreeDownloadManager is also 40+ MB and my mobile speed ranges from 5 minutes to 3+ hours, i'll use the HTTP Range header and requests, the easy HTTP(S) lib: https://stackoverflow.com/questions/22894211/how-to-resume-file-download-in-python

def resume_download(fileurl, resume_byte_pos):
    resume_header = {'Range': 'bytes=%d-' % resume_byte_pos}
    return requests.get(fileurl, headers=resume_header, stream=True,  verify=False, allow_redirects=True)

@RonnyPfannschmidt
Copy link
Contributor

@CTimmerman if its as easy as you claim, please open a pr with the feature ^^

@pradyunsg
Copy link
Member

And does it make sense to work on a closed issue?

Not every PR needs to close an issue. :)

As @dstufft said, we would accept a PR for it.

@CTimmerman
Copy link

CTimmerman commented Jul 9, 2018

Ah, here it is. I'll drop my complete code link here in case someone knows how to add this to pip. I've only found a duplicate line (prepare.py:207), and bug (no retry by default?): https://gist.github.com/CTimmerman/ccf884f8c8dcc284588f1811ed99be6c

@pradyunsg
Copy link
Member

#4796 is a newer issue for tracking this -- I'm going to let that one stay open. If someone wants to have their PR close an issue, that's the issue your PR can close. :)

@CTimmerman You should follow https://pypi.org/security/ to report security issues.

@lock
Copy link

lock bot commented Jun 2, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 2, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation type: enhancement Improvements to functionality
Projects
None yet
Development

No branches or pull requests

7 participants