anaconda2安裝igraph

igraph的python 版本使用
http://igraph.org/python/doc/tutorial/install.html#installing-igraph
因爲目前要求packages for Python 2.6, Python 2.7 and Python 3.2,
在我已安裝anaconda2(基於Python 2.7的)的前提下,在cmd通過命令pip install igraph安裝igraph。
安裝後在 spider中 import igraph 提示如下問題:

DeprecationWarning: To avoid name collision with the igraph project, this visualization library has been renamed to ‘jgraph’. Please upgrade when convenient.
具體問題及解決:
https://stackoverflow.com/questions/36554467/how-to-install-igraph-python-package-on-windows
通過pip install python-igraph 進行安裝,在安裝前,提示pip版本問題,根據提示語句
python -m pip install –upgrade pip 更新pip。
但是cmd安裝pip install python-igraph 一直出現其他錯誤:

這裏寫圖片描述
暫時改爲另一個方法pip insall jgraph,並不是想要的包。(可能是自己調用問題)

最終,在 http://www.lfd.uci.edu/~gohlke/pythonlibs/#python-igraph
上根據自己的python版本下載python_igraph‑0.7.1.post6‑cp27‑none‑win_amd64.whl, 通過
pip 安裝whl文件:pip install 文件名.whl 。
具體方法:在cmd命令窗口中,
找到存放python_igraph‑0.7.1.post6‑cp27‑none‑win_amd64.whl的路徑,再輸入命令pip install python_igraph‑0.7.1.post6‑cp27‑none‑win_amd64.whl
這裏寫圖片描述

ok,安裝成功。
在anaconda2中輸入import igraph 運行後, 沒有出現任何error或warning.

使用igraph時需要安裝cairo
參考:http://chuanwang66.iteye.com/blog/1704942

安裝cairo出現問題TypeError: plotting not available ,具體見下一篇內容:
http://blog.csdn.net/xidianliutingting/article/details/72832475

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章