Ubuntu 14.04 安裝graph-tool

Ubuntu 14.04 安裝graph-toolpython

 

    graph-tool是不錯的網絡和圖分析工具集,目前僅支持Mac和Linux系列版本,可是最新版在Mac下編譯經過,執行總是報錯,只能Ubuntu 14.04 安裝graph-tool。git

    下面爲安裝腳本:github

sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y install expat
sudo apt-get -y install libsparsehash-dev
sudo apt-get -y install gtk+3
sudo apt-get -y install libboost-all-dev
sudo apt-get -y install graphviz
sudo apt-get -y install build-essential
sudo apt-get -y install libcairo2-dev
sudo apt-get -y install python-pip
sudo apt-get -y install python-dev
sudo apt-get -y install python-matplotlib
sudo apt-get -y install gfortran libopenblas-dev liblapack-dev
sudo apt-get -y install libcgal-dev
sudo apt-get -y install python-numpy
sudo apt-get -y install python2.7-config
sudo apt-get -y install python-cairo
sudo apt-get -y install python-scipy
sudo apt-key adv --keyserver pgp.skewed.de --recv-key 98507F25
echo 'deb http://downloads.skewed.de/apt/trusty trusty universe' | sudo tee -a  /etc/apt/sources.list
echo 'deb-src http://downloads.skewed.de/apt/trusty trusty universe' | sudo tee -a  /etc/apt/sources.list
sudo apt-get update
sudo apt-get -y --force-yes install python-graph-tool

 

    安裝以後,在python環境下運行命令ubuntu

from graph_tool.all import *

    成功!網絡

    開始進行地理網絡分析部分的實驗啦。python2.7

   參考:工具

1. graph-tool官網ui

https://graph-tool.skewed.de/spa

2. 安裝參考code

https://gist.github.com/nlap/56061e47a2a8d69eb5f3

相關文章
相關標籤/搜索