您的位置:首页 > 编程语言 > Python开发

anaconda2安装igraph

2017-05-24 18:04 447 查看
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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  python anaconda2 igraph