安装Hanlp2.1报错探索
hanlp安装需要tensorflow本机环境anaconda:python 3.6tensorflow 2.1.01. 直接安装:pip install hanlp使用hanlp.load(“CTB6_CONVSEG”)报错:AttributeError: 'str' object has no attribute 'decode'原因:安装不完全2.重新安装使用镜像安装:pip install
·
hanlp 安装需要tensorflow
本机环境anaconda:
- python 3.6
- tensorflow 2.1.0
1. 直接安装:
pip install hanlp
使用hanlp.load(“CTB6_CONVSEG”)报错:
AttributeError: 'str' object has no attribute 'decode'
原因:安装不完全
2.重新安装
使用镜像安装:
pip install -i https://pypi.douban.com/simple/ hanlp[full]
pip install tensorflow-gpu==2.1.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
镜象地址汇总:
中间可能报错:
按报错提示更改命令:加个–user
pip install hanlp[full] -i https://pypi.douban.com/simple/ --user
更多推荐
所有评论(0)