win10环境下,使用 pip install pyltp 安装LTP时,命令行报错 Failed building wheel for pyltp
解决方法:
先下载ltp对应python版本的whl文件
pyltp-0.2.1-cp35-cp35m-win_amd64.whl
pyltp-0.2.1-cp36-cp36m-win_amd64.whl
云盘下载地址
链接:https://pan.baidu.com/s/11Duvsn_POU6MCK2tBMvipg&shfl=sharepset
提取码:i6o6
再安装whl文件
# python3.5
pip install D:\pyltp-0.2.1-cp35-cp35m-win_amd64.whl
# python3.6
pip install D:\pyltp-0.2.1-cp36-cp36m-win_amd64.whl
再安装ltp
pip install pyltp
安装成功。
云盘链接失效了,可以去github上查看其他安装方法。GitHub - HIT-SCIR/pyltp: pyltp: the python extension for LTP
如使用源代码安装:
$ git clone https://github.com/HIT-SCIR/pyltp
$ cd pyltp
$ git submodule init
$ git submodule update
$ python setup.py install