V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
JNian
V2EX  ›  Python

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

  •  
  •   JNian · 115 天前 · 1196 次点击
    这是一个创建于 115 天前的主题,其中的信息可能已经有所发展或是发生改变。
    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.
    5 条回复    2024-01-03 17:45:20 +08:00
    JNian
        1
    JNian  
    OP
       115 天前
    解决了,增加- 'DOMAIN-SUFFIX,cdn-lfs-us-1.huggingface.co, 你机场的名'和导入>pip install urllib3==1.25.11
    loadingimg
        2
    loadingimg  
       115 天前
    export HF_ENDPOINT=https://hf-mirror.com
    alexsz
        3
    alexsz  
       115 天前
    应该这样吧:HTTPS_PROXY=http://127.0.0.1:7890
    RoccoShi
        4
    RoccoShi  
       115 天前
    直接开 TUN 模式解决一切系统代理烦恼
    iorilu
        5
    iorilu  
       115 天前
    pip install urllib3==1.25.11

    这是干啥用的, 自带 urllib 不能用吗
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1634 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 16:40 · PVG 00:40 · LAX 09:40 · JFK 12:40
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.