fasttext: cannot load * due to c++ extension failed to allocate the memory

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/a1368783069/article/details/85708402

背景:
使用fasttext开发意图识别(文本分类)功能,并使用python httpserver搭建意图识别服务。在测试环境是没有使用问题。

但是将服务部署到线上环境,准备运行时。报错 :fasttext:

 cannot load * due to c++ extension failed to allocate the memory

解决:
在安装fasttext时,是直接使用 sudo pip install fasttext。使用官方方法替代:
按照官方的方法安装fasttext: https://github.com/facebookresearch/fastText/tree/master/python

git clone https://github.com/facebookresearch/fastText.git
cd fastText
pip install .

重新执行服务。

猜你喜欢

转载自blog.csdn.net/a1368783069/article/details/85708402