在python环境变量中添加代理
sudo gedit ~/.bashrc
#末尾添加
export http_proxy="http://proxyaddress:port"
export https_proxy="https://proxyaddress:port"
export ftp_proxy="ftp://proxyaddress:port"
source ~/.bashrc
为apt-get添加代理
sudo gedit /etc/apt/apt.conf
#末尾添加
Acquire::http::proxy "http://proxyaddress:port/";
Acquire::ftp::proxy "ftp://proxyaddress:port/";
Acquire::https::proxy "https://proxyaddress:port/";
网友评论