Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing timeout limit when using conda install

Tags:

anaconda

I originally posted this to the Continuum github but didn't get a response, so thought I'd try stackoverview.

I have been trying to create a Python 3.4 environment with the latest installer, which I managed to get through the early part fine. It downloads the first few packages but hangs at 99% then subsequently times out when it gets to this package.

https://repo.continuum.io/pkgs/free/win-64/qt-5.6.2-vc14_3.tar.bz2

I can download it manually in Chrome but it has a similar behaviour - getting stuck at 55.2/55.3mb and stays there for a while before completing. I'm behind a proxy but I do have the correct proxy settings in .condarc. Is there a way to change the timeout limit when I'm downloading it through conda?

Cheers

like image 906
swmfg Avatar asked Mar 14 '17 22:03

swmfg


People also ask

How speed up conda install?

One option for speeding up conda is to reduce the index. The index is reduced by conda based upon the user's input specs. It's likely that your repodata contains package data that is not used in the solving stage. Filtering out these unnecessary packages before solving can save time.

How do you adjust conda settings?

To set configuration options, edit the . condarc file directly or use the conda config --set command. For a complete list of conda config commands, see the command reference. The same list is available at the terminal or Anaconda Prompt by running conda config --help .

Why is conda install slower than pip?

The Conda User Guide offers one possible reason for poor performance: Unlike many package managers, Anaconda's repositories generally don't filter or remove old packages from the index. This allows old environments to be easily recreated.

How stop conda install?

To exit the virtual environment, use the command conda deactivate .


1 Answers

I had the same issue. In conda < 4.3.0, the timeout was hardcoded to 60 seconds. In Windows, I'm guessing, that's not enough for huge package with a lot of binary files like qt since most likely the virus scanner kicks in to check the files. You can hack your ~userid\AppData\Local\Continuum\Anaconda3\lib\site-packages\conda\fetch.py and change the hard-coded constant yourself, eg. from 60 to 300.

With newer version (I'm not sure when this was added, but I see this in my conda 4.3.22), running conda config --show gave: remote_read_timeout_secs: 60.0. So I believe you can modify it by adding it to your ~userid\.condarc file.

like image 65
sindux Avatar answered Sep 17 '22 08:09

sindux