怎么设置能够使 pycharm 运行需要 huggingface 的代码

128 天前
 JNian
hugggingface.co 无法访问。需要开 clash 系统代理才能访问,但是仍然无法跑通代码.
设置了 set HTTP_PROXY=http://127.0.0.1:7890 和设置了 set HTTPS_PROXY=https://127.0.0.1:7890 也不行,rules 增加 - 'DOMAIN-SUFFIX,huggingface.co, ***'也不行


urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /api/models/Systran/faster-whisper-large-v2/revision/main (Caused by ProxyError('Unable to connect to proxy', SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)')))).

requests.exceptions.ProxyError: (MaxRetryError("HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /api/models/Systran/faster-whisper-large-v2/revision/main (Caused by ProxyError('Unable to connect to proxy', SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)'))))"), '(Request ID: 98a168c5-6b91-4817-8adf-a00730797e61)')

huggingface_hub.utils._errors.LocalEntryNotFoundError: Cannot find an appropriate cached snapshot folder for the specified revision on the local disk and outgoing traffic has been disabled. To enable repo look-ups and downloads online, pass 'local_files_only=False' as input.
1236 次点击
所在节点    Python
5 条回复
JNian
128 天前
解决了,增加- 'DOMAIN-SUFFIX,cdn-lfs-us-1.huggingface.co, 你机场的名'和导入>pip install urllib3==1.25.11
loadingimg
127 天前
export HF_ENDPOINT=https://hf-mirror.com
alexsz
127 天前
应该这样吧:HTTPS_PROXY=http://127.0.0.1:7890
RoccoShi
127 天前
直接开 TUN 模式解决一切系统代理烦恼
iorilu
127 天前
pip install urllib3==1.25.11

这是干啥用的, 自带 urllib 不能用吗

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/1005409

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX