HIT-SCIR / ltp

Language Technology Platform
http://ltp.ai
4.98k stars 1.04k forks source link

ImportError: cannot import name 'PaddingStrategy' #620

Closed MengfeiShen closed 1 year ago

MengfeiShen commented 1 year ago

您好,我在 from ltp import LTP这一步,就报错了,显示import错误。

ImportError: cannot import name 'PaddingStrategy' from 'transformers.utils' (/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/transformers/utils/init.py)

我是按照README里的方式pip install -U ltp ltp-core ltp-extension安装的。 请问应该怎么办? 谢谢您。 截屏2022-12-10 17 39 08

AlongWY commented 1 year ago

升级一下 transformers 试一下