由于要使用hanlp进行分词,而我们的环境是python环境所以得安装pyhanlp,但是安装过程总是出现这样的问题
看上去感觉是缺少了visual c++环境,于是安装visual c++,可查看这个博客
http://www.hankcs.com/nlp/python-calls-hanlp.html
安装完后发现问题并没有解决,初步怀疑应该是 jpype1没有安装成功,于是使用pip install jpype1发现果然失败,
最终手动安装pip install D:\soft\JPype1-0.6.2-cp36-cp36m-win_amd64.whl 安装成功
安装包地址:https://www.lfd.uci.edu/~gohlke/pythonlibs/#jpype
注意如果出现 JPype1-0.6.3-cp36-cp36m-win_amd64.whl is not a supported wheel on this platform.可看如下搭配更换版本:
cp27
→ CPython 2.7cp34
→ CPython 3.4cp35
→ CPython 3.5cp36
→ CPython 3.6
and
win32
→ 32-bit version of ms-windowswin_amd64
→ 64-bit version of ms-windows