在
C:\Users\<username>\
找到.condarc文件
修改内容为:
channels:
- defaults
# Show channel URLs when displaying what is going to be downloaded and
# in 'conda list'. The default is False.
show_channel_urls: True
allow_other_channels: True
proxy_servers:
http: http://proxy.yourorg.org:port
https: http://proxy.yourorg.org:port
ssl_verify: False
加了清华镜像后我的文件内容为:
channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
- defaults
show_channel_urls: True
allow_other_channels: True
proxy_servers:
http: http://proxy.tencent.com:8080
https: http://proxy.tencent.com:8080
ssl_verify: False
另外,如果是pip的话,只需要在安装包的时候用如下格式(比如tensorflow):
pip --proxy=http://username:password@proxyURL:portNumber install tensorflow
本文介绍如何修改Anaconda的.condarc文件,包括设置渠道、启用代理服务器和禁用SSL验证,以及使用清华镜像加速下载。同时,提供通过pip安装包时使用代理的方法。
1639

被折叠的 条评论
为什么被折叠?



