linux为不能上网的服务器设置代理,pip,wget,conda...

实验室服务器由于网络问题需要设置代理

export http_proxy=http://xxxx

export之后经常没用,不知道为什么,所以可以为每个命令设置代理


  1. wget
wget -e http_proxy=xxxx -c urlyyyy
  1. pip
pip install --user --proxy=http://xxxx 

--user可以只为自己的账号install

  1. conda需要配置condarc
vi ~/.condarc

channels:
  - bioconda
  - r
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
  - defaults
show_channel_urls: true
proxy_servers:
  http: http://xxxx
  https: https://xxxx
ssl_verify: false
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容