jupyer配置vpn 发表于 2019-01-07 | 分类于 dxz | 字数统计: 199 | 阅读时长 ≈ 1 方式一:命令行启动jupyter,网页运行clash#另开窗口proxychains4 jupyter notebook#遇到要输入token或者密码jupyter server list#输出结果 可直接访问链接进入网页 也可以将token复制输入进入Currently running servers:http://localhost:8888/?token=6dfa4d91bcf91e6156f649fbe39fb809526750eeb37c67b9 :: /home/win/16t2/study/deep_learning/gene/project/dnagpt2 方式二:在 Jupyter Notebook代码框内部配置代理import requests# 设置代理proxies = { "http": "http://127.0.0.1:7890", "https": "https://127.0.0.1:7890"}#http://<proxy_ip>:<proxy_port># 使用代理发送请求response = requests.get("http://google.com", proxies=proxies)print("Status Code:", response.status_code)print("Response Text:", response.text)#返回状态码为200即返回成功#或者import osos.environ['HTTP_PROXY'] = 'http://127.0.0.1:7890'os.environ['HTTPS_PROXY'] = 'https://127.0.0.1:7890' ------ 本文结束 🎉🎉 谢谢观看 ------