2

I've got a PC with a slow internet connection. When trying to install an about 500MB package (conda install -c pytorch pytorch), I get a download timeout.

I tried downloading this file manually elsewhere and then placing it in my home directory and installing with conda install --offline ~/pytorch-1.0.0-py3.7_cuda9.0.176_cudnn7.4.1_1.tar.bz2 (like here). This works by itself, however, when I try to install further packages depending on it, conda decides to download it:

The following packages will be UPDATED:
    pytorch:         1.0.0-py3.7_cuda9.0.176_cudnn7.4.1_1 <unknown> --> 1.0.0-py3.7_cuda9.0.176_cudnn7.4.1_1 pytorch
Proceed ([y]/n)? y
Downloading and Extracting Packages
pytorch-1.0.0        | 498.7 MB  | ###########5              |   8% 

CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://conda.anaconda.org/pytorch/linux-64/pytorch-1.0.0-py3.7_cuda9.0.176_cudnn7.4.1_1.tar.bz2>
Elapsed: -

An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.

Note the ... <unknown> --> ... pytorch. Apparently, when installed with --offline, the package source is unknown and that leads to re-download. I also naively tried placing the file into ~/miniconda3/pkgs, no success.

Is there a way to increase the download timeout limit for conda, or let it recognize the pre-downloaded .tar.bz2 package file?

I understand that it has little to do with pytorch, but I just leave real names as they are.

Xpector
  • 427
  • 1
  • 5
  • 11

1 Answers1

1

I encountered the same problem. There is a way to change the time out limit:

conda config set remote_read_timeout_secs 120

for example. However in my case it does not work. It turns out that there is a bandwidth limit in our lab and when the download speed exceeds that limit, its network is simply cut.

yzhq97
  • 26
  • 1