python-igraph インストール・ libiconv.la: No such file or directory エラーの解決方法
前回に引き続き、ネットワーク分析 (Rで学ぶデータサイエンス 8)の勉強を python で行う続き。
ところが、python-igraph を Anaconda 環境にインストールしようとしたところ、libiconv.la がない、というようなエラーが出て、結構手こずったので解決方法のメモ残す。
python-igraph を Anaconda 環境にインストール > libiconv.la: No such file or directory エラー
実際のエラーはこんな感じ↓
grep: /usr/lib/libiconv.la: No such file or directory /Users/[MY_ENV_PATH]/bin/gsed: can't read /usr/lib/libiconv.la: No such file or directory libtool: link: `/usr/lib/libiconv.la' is not a valid libtool archive make[3]: *** [libigraph.la] Error 1 make[2]: *** [all] Error 2 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 Could not download and compile the C core of igraph.
libiconv.la: No such file or directory エラー 解決方法
どうやら上のエラーログから C のライブラリ「 igraph 」のインストールに失敗している気配。
python-igraph は python から使うためのインターフェースで、本体は igraph ってことか。
調べたところ、igraph 自体をまず brew でインストールして、その後 anaconda 環境で pip でインストールできるっぽい。
$ brew install igraph $ source activate YOUR_CONV_ENV (your-conv-env) % pip install python-igraph
・・・・・・
できた!
Successfully built python-igraph Installing collected packages: python-igraph Successfully installed python-igraph-0.7.1.post6
というわけで、Anaconda に python-igraph をインストールしようとしてできなかった場合は、個別に igraph と python-igraph のインストールを試して見る。
参考:
Get Started with python-igraph(英語)
- 作者: 鈴木努,金明哲
- 出版社/メーカー: 共立出版
- 発売日: 2009/09/25
- メディア: 単行本
- 購入: 5人 クリック: 62回
- この商品を含むブログ (9件) を見る