包括jupyter 以内的python程序使用代理
添加一下代码:
# 导入模块
import os
# 设置代理
proxy = 'http://127.0.0.1:1080' #代理地址
os.environ['http_proxy'] = proxy
os.environ['HTTP_PROXY'] = proxy
os.environ['https_proxy'] = proxy
os.environ['HTTPS_PROXY'] = proxy
标签:Python,程序,代理,environ,proxy,os,PROXY
From: https://www.cnblogs.com/DLKKILL/p/17255333.html