您的位置:首页 > 运维架构 > Linux

linux环境下ipython notebook安装GraphLab

2017-02-20 20:13 363 查看
一般来讲,网络分析主要采用Ucinet、Netdraw、Gephi、Cytoscape、NodeXL等,但是往往节点或边数量受到限制,大部分只能处理节点或边在5000-10万之间。

对于大尺度的网络分析需要寻找新的编程思路,这里选择Python编程IPython Notebook编程环境,特别是Graphlab包提供了SGraph图数据包和分析Toolkits等一系列算法。

GraphLab可以在python环境当中非常好地使用。但它在接受了两轮投资之后已经由原来的免费项目变成了一个付费试用的项目。但是个人和学术使用依然可以申请。伴随着这个商业化的过程,graphlab.org也变成了dato.com.

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

首先在其官网注册,获得key,可以免费使用一年。

然后参考官网安装指南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版本> = 7
miniconda 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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  GraphLab