本来以为很简单的安装,因为网上有各种教程,结果安了1天。。。

1. 安装Microsoft Visual C++ 14.0及配置好环境

按照https://blog.csdn.net/qq_45098842/article/details/122268493里面的 solved_packageMissInInstalling_mu_visual_cpp_build_tools_2015.zip  安装好

2. 安装 cmake 

参考https://blog.csdn.net/qq_38796548/article/details/106735661 

下载cmake-3.23.0-rc2-windows-x86_64 的zip文件 https://cmake.org/files/v3.23/ , 加载环境变量

3. 安装boost

pip install boost

4. 安装kenlm

可以一下方法都尝试下  尝试之前 最好重启下电脑 并更换pip国内源地址:

# 清华源
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
# 阿里源
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
# 腾讯源
pip config set global.index-url http://mirrors.cloud.tencent.com/pypi/simple
# 豆瓣源
pip config set global.index-url http://pypi.douban.com/simple/
# 换回默认源
pip config unset global.index-url

最后执行:pip install kenlm。

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐