LoginSignup
2
5

More than 5 years have passed since last update.

pythonからfasttextを実行すると`failed to allocate the memory`に遭遇した。

Posted at

環境

  • python2.7
  • docker

原因

下記のコマンドでいれたfasttextがダメだった。

pip install fasttext

この状態で以下を実行しても

model = fastText.load_model('test.bin')

エラーが発生する

Exception: fastText: Cannot load model.bin due to C++ extension failed to allocate the memory

解決方法

ちゃんとfacebook公式のfasttextの導入にしたがってやるべき
https://github.com/facebookresearch/fastText/tree/master/python

$ git clone https://github.com/facebookresearch/fastText.git
$ cd fastText
$ python setup.py install
2
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
5