LoginSignup
0
0

More than 5 years have passed since last update.

displaCyをインストールする(CentOS)

Last updated at Posted at 2017-07-19

displaCy はとても便利だが、普通にインストールするとエラーが出てうまくいかない。githubのReadme通りにやったら全然うまく行かなくて20時間ハマった。

sudo権限とか、npmのオプションとか、nodeのバージョンとか様々な壁にぶち当たったがなんとか解決。以下のコマンドを順番に打って行けばインストールできるはず。試したのはCentOS7だけど、おそらく6でも可能。Ubuntuなど別のディストリビューションでも yum を apt-get など適切なコマンドに置き換えれば多分うまくいく。

余計なものをインストールしたり、sudoをつけたりすると取り返しのつかないことになりうるのでやめましょう。

# make yum latest version
sudo yum -y update

# install n(node version management tool). Answer "y" to all
sudo yum -y install git
sudo curl -L https://git.io/n-install | bash

# read bashrc to enable n
. ~/.bashrc

# install and switch to node 8.0.0
n 8.0.0

# update npm(node package modules)
npm update npm

# do not use npm scripts as root by default
npm config set unsafe-perm true

# install c and c++ in case npm use it
sudo yum -y install gcc gcc-c++

# install harp
npm install -g harp

# if necessary, download demo and launch server with harp(don’t forget to open port 9000)
git clone https://github.com/explosion/displacy
cd displacy
harp server -p 9000
0
0
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
0
0