问题描述:
Linux本地配置了~/.bashrc文件
142 export http_proxy="http://xxx.xx.xx.xx:808"
143 export https_proxy="https://xxx.xx.70.xx:808"
但是使用pip和conda安装库时依然出现类似proxy error的错误
解决方法:
pip:
在pip配置文件~/.config/pip/pip.conf中添加
[global]
proxy = http://XXXX.com:port
proxy后为Linux中配置的代理服务器
conda:
在conda配置文件~/.condarc中添加
proxy_servers:
http: http://xxx.xx.com:8080
https: https://xxx.xx.com:8080
添加完保存之后可正常通过pip和conda下载所需库文件
参考:
https://blog.csdn.net/leviopku/article/details/98766822
https://blog.csdn.net/king_cpp_py/article/details/81192387