linux环境下ipython notebook安装GraphLab

来源:互联网 发布:杭州淘宝服装摄影 编辑:程序博客网 时间:2024/05/29 17:13

一般来讲,网络分析主要采用Ucinet、Netdraw、Gephi、Cytoscape、NodeXL等,但是往往节点或边数量受到限制,大部分只能处理节点或边在5000-10万之间。
对于大尺度的网络分析需要寻找新的编程思路,这里选择Python编程IPython Notebook编程环境,特别是Graphlab包提供了SGraph图数据包和分析Toolkits等一系列算法。
GraphLab可以在python环境当中非常好地使用。但它在接受了两轮投资之后已经由原来的免费项目变成了一个付费试用的项目。但是个人和学术使用依然可以申请。伴随着这个商业化的过程,graphlab.org也变成了dato.com.


这里我简单介绍graphlab在ipython notebook当中的安装和使用。为了简化整个过程,推荐在anaconda中试用graphlab。

  1. 首先在其官网注册,获得key,可以免费使用一年。
  2. 然后参考官网安装指南graphlab官网,根据系统,选择对应的安装方式。这里我的系统是linux,所以我接下来的操作都是在Linux环境下进行的。这里写图片描述

官网提供了两种不同的安装方式:

一:通过Anaconda2 v4.0.0
1. 下载好Anaconda2 v4.0.0后,使用命令:bash /path to download file/Anaconda2-4.0.0-Linux-x86_64.sh安装Anaconda。
2. 创建conda环境
conda create -n gl-env python=2.7 anaconda=4.0.0
source activate gl-env

3. 确保pip版本> = 7miniconda users may need to install pip first, using 'conda install pip'
conda update pip

4. 安装GraphLab创建pip install --upgrade --no-cache-dir https://get.graphlab.com/GraphLab-Create/2.1/your registered email address here/your product key here/GraphLab-Create-License.tar.gz
5. 确保安装IPython和IPython Notebook(注意:IPython Notebook的安装可以看我的上一篇博客)# Install or update IPython and IPython Notebook
conda install ipython-notebook

二.是通过virtualenv在Python环境中安装
1.通过命令 pip freeze查看是否安装了virtualenv。
这里写图片描述
我的电脑已经安装了,若没有安装,可使用 sudo pip install virtualenv
2. 创建并激活新的虚拟环境(推荐)
# Create a virtual environment named e.g. gl-env
virtualenv gl-env
# Activate the virtual environment
source gl-env/bin/activate
3. 确保pip版本> = 7
# Make sure pip is up to date
pip install –upgrade pip
这里写图片描述
4. 确保安装IPython和IPython Notebook
# Install IPython Notebook (optional)
pip install “ipython[notebook]”
5. 安装GraphLab创建
# Install your licensed copy of GraphLab Create
pip install –upgrade –no-cache-dir https://get.graphlab.com/GraphLab-Create/2.1/your registered email address here/your product key here/GraphLab-Create-License.tar.gz
这里写图片描述


参考资料如下:

https://turi.com/learn/userguide/install.html
https://turi.com/download/install-graphlab-create.html

0 0
原创粉丝点击