anaconda 安装包 超时_AnaConda环境下安装librosa包超时

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.

笔者本地的是4.2.0版本Anaconda3-4.2.0-Linux-x86_64.sh

尝试执行命令报错:

conda config --set remote_read_timeout_secs 3600

20200105101614732975.png

报错信息:

ubuntu@ubuntu-B85-D3V:~$ conda config --set remote_read_timeout_secs 3600CondaValueError: Value error: Error key must be one of add_binstar_token, update_dependencies, binstar_upload,

always_copy, anaconda_upload, add_pip_as_python_dependency, allow_other_channels, channel_priority, changeps1, always_yes,

shortcuts, channel_alias, use_pip, auto_update_conda, add_anaconda_token, ssl_verify, client_cert_key, client_cert,

show_channel_urls, offline, allow_softlinks, not remote_read_timeout_secs

也就是当前版本4.2.0还不支持这个remote_read_timeout_secs环境变量设置

笔者在最新版的官方文档上找到超时相关资料,各位可以根据实际情况酌情使用这两个参数:

远程连接超时(默认9.15秒)

# # remote_connect_timeout_secs (float)

# # The number seconds conda willwait foryour client to establish a

# # connection to a remote url resource.

# #

# remote_connect_timeout_secs:9.15

远程读取超时(默认60秒)

# # remote_read_timeout_secs (float)

# # Once conda has connected to a remote resource and sent an HTTP

# # request, the read timeout is the number of seconds conda willwait for# # the server to send a response.

# #

# remote_read_timeout_secs:60.0

结论

升级AnaConda版本或者更换镜像源

wget https://repo.anaconda.com/archive/Anaconda3-2019.10-Linux-x86_64.sh

chmod +x Anaconda3-2019.10-Linux-x86_64.sh

安装过程很简单,一路回车即可

20200105101614820869.png

20200105101614887278.png

20200105101614954663.png

20200105101615067949.png

配置环境变量

vim ~/.bashrc

# added by Anaconda3 4.2.0installer

export PATH="/home/ubuntu/anaconda3/bin:$PATH"export CUDA_HOME=/usr/local/cuda-10.2export PATH="$CUDA_HOME/bin:$PATH"export LD_LIBRARY_PATH="$CUDA_HOME/lib64:$LD_LIBRARY_PATH"

20200105101615218345.png

参考来源:https://stackoverflow.com/questions/42797957/changing-timeout-limit-when-using-conda-install

https://docs.conda.io/projects/conda/en/latest/configuration.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值