LoginSignup
1
2

More than 3 years have passed since last update.

macにfastTextをインストールメモ

Posted at

fastText

facebookが開発した自然言語の機械学習用ライブラリです。超便利です。

状況

私はpythonで使うことを想定しています。
新しく購入したmacbook proでのセットアップしているメモです。
pythonはmacに入っているものをそのまま使うつもりでインストールしています。

インストール

@darkimpact0626 さんの投稿を参考にインストールします。
まずはgithubに公開されているfastTextをcloneします。

git clone https://github.com/facebookresearch/fastText.git

cloneできたら、次はpip3でインストール

cd fastText
pip3 install .

こんなエラーがでた。。。

Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/9v/6l7p92j14kv_w02d6bql_x8m0000gn/T/pip-req-build-efvyw6w7/
You are using pip version 19.0.3, however version 20.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

こんな感じでupgradeして、

/usr/bin/pip3 install --user --upgrade pip

もう一度やってみたら、OK。でも今度は警告がでた。

WARNING: The scripts f2py, f2py3 and f2py3.7 are installed in '/Users/xxxxxx/Library/Python/3.7/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

なるほど、パスを通せと。(xxxxxxはユーザー名です)
ということで指示に従い、パスを通します。

export PATH=/Users/xxxxxx/Library/Python/3.7/bin:$PATH

パスが通っているか、確認します。

echo $PATH
1
2
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
1
2