使用hanlp下载预训练模型出错

第一次发帖,对于格式如有错误的地方还请海涵
新手入门初学nlp,用到了hanlp,使用过程中需要load预训练模型,但是一直报错,尝试过pip3 install hanlp[full]以及pip3 install upgrade hanlp,都无法解决问题
目前使用win10系统,python3.6,torch1.7.1, tensorflow2.3.0, hanlp2.1.0a22
以下是错误代码:
tokenizer = hanlp.load(‘CTB6_CONVSEG’)
tokenizer = hanlp.load(hanlp.pretrained.ner.MSRA_NER_BERT_BASE_ZH)
均会报错
以下是所报错误:
Failed to load https://file.hankcs.com/hanlp/tok/ctb6_convseg_nowe_nocrf_20200110_004046.zip. See traceback below:
================================ERROR LOG BEGINS================================
Traceback (most recent call last):
File “E:\anaconda\envs\tensorflow\lib\site-packages\hanlp\utils\component_util.py”, line 74, in load_from_meta_file
obj: Component = object_from_classpath(cls)
File “E:\anaconda\envs\tensorflow\lib\site-packages\hanlp_common\reflection.py”, line 27, in object_from_classpath
classpath = str_to_type(classpath)
File “E:\anaconda\envs\tensorflow\lib\site-packages\hanlp_common\reflection.py”, line 44, in str_to_type
cls = getattr(importlib.import_module(module_name), class_name)
File “E:\anaconda\envs\tensorflow\lib\importlib_init_.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 994, in _gcd_import
File “”, line 971, in _find_and_load
File “”, line 955, in _find_and_load_unlocked
File “”, line 665, in _load_unlocked
File “”, line 678, in exec_module
File “”, line 219, in _call_with_frames_removed
File “E:\anaconda\envs\tensorflow\lib\site-packages\hanlp\components\tok_tf.py”, line 12, in
from hanlp.components.taggers.transformers.transformer_tagger_tf import TransformerTaggerTF
File “E:\anaconda\envs\tensorflow\lib\site-packages\hanlp\components\taggers\transformers\transformer_tagger_tf.py”, line 11, in
from hanlp.layers.transformers.loader_tf import build_transformer
File “E:\anaconda\envs\tensorflow\lib\site-packages\hanlp\layers\transformers\loader_tf.py”, line 9, in
from bert import albert_models_tfhub, fetch_tfhub_albert_model, load_stock_weights
ImportError: cannot import name ‘albert_models_tfhub’
=================================ERROR LOG ENDS=================================
If the problem still persists, please submit an issue to https://github.com/hankcs/HanLP/issues
When reporting an issue, make sure to paste the FULL ERROR LOG above.
ERROR:root:Internal Python error in the inspect module.
Below is the traceback from this internal error.
请大家看一下,我可以尝试哪些解决方法呢?

无法复现,参考 colab:

HanLP每次发布都经过了持续集成系统检验,不存在安装问题。如果安装失败,CI根本不会发布。那些遇到问题的都是自己安装了不兼容的第三方库导致的。存在异议的人,请直接运行上述colab验证。

如果你实在没有能力,建议直接用colab跑,大概比你的Windows还快一些。

您好,我进入链接这边显示需要访问权限是怎么回事呢

感谢反馈,已修改。

+1 老哥解决了吗 我和你一样

同样的问题,版本:hanlp2.1.0-alpha.47