目录
Windows CMD:
powershell
Linux / macOS / Git Bash:
win11 设置全局系统变量代理
modelscope ProxyError: HTTPSConnectionPool(host='www.modelscope.cn', port=443)
报错:
requests.exceptions.ProxyError: HTTPSConnectionPool(host='www.modelscope.cn', port=443): Max retries exceeded with url: /api/v1/models/Qwen/Qwen3-8B (Caused by ProxyError('Unable to connect to proxy', FileNotFoundError(2, 'No such file or directory')))
解决方法:
Windows CMD:
set HTTP_PROXY=http://127.0.0.1:7890
set HTTPS_PROXY=http://127.0.0.1:7890
powershell
$env:HTTP_PROXY="http://127.0.0.1:7890"
$env:HTTPS_PROXY="http://127.0.0.1:7890"
Linux / macOS / Git Bash:
export HTTP_PROXY=http://127.0.0.1:7890
export HTTPS_PROXY=http://127.0.0.1:7890
win11 设置全局系统变量代理
-
右键「此电脑」→ 属性 → 高级系统设置
-
点击「环境变量」
-
在「系统变量」或「用户变量」里点击“新建”
-
变量名:
HTTP_PROXY
-
变量值:
http://127.0.0.1:7890
-
-
再添加一个:
-
变量名:
HTTPS_PROXY
-
变量值:
http://127.0.0.1:7890
-
-
确认保存后,重新打开命令行窗口才能生效