在
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
联系客服