大概的過程是這樣的:
先裝了python3.6.1.,然后發現搞錯了Σ(  ̄□ ̄||),是32 bit的,卸了重裝python 3.6.1 (64bit)。
然后裝easy_install、pip、ipython notebook。歷經千辛萬苦搞定了ipython notebook之后,
再去turi下載graphlab,發現這玩意要求python 2.7的環境。。。(╯°口°)╯(┴—┴

還能怎么辦呢只有重新裝python2.7 64bit,
然后直接按turi推薦的步驟,先安裝anaconda,再裝graphlab,
最后在ipython notebook里import graphlab。。。(╯°口°)╯(┴—┴
總結下遇到的一些問題。
1. 32bit和64bit的安裝包。
進入python官網 https://www.python.org/downloads/windows/
可以看到如下一堆可下載的安裝包。
框出來的這兩個都是 32bit 的。

64bit的在哪呢,這里。

其他的安裝python注意事項:
1.記得要勾添加到path這一項或者之后手動添加路徑
2. install for all users。
2. 安裝 easy install 時報錯TypeError: chown() missing 1 required positional argument: 'numeric_owner'
下載ez_setup-0.9.tar壓縮包,地址:https://pypi.python.org/pypi/pip
解壓后cmd里到相應的目錄下運行python ez_setup.py
然后就一直報錯
TypeError: chown() missing 1 required positional argument: 'numeric_owner'
解決方法:
在stackoverflow里找到解決辦法就是找到壓縮包里ez_setup.py這個文件然后手動把
self.chown(tarinfo, dirpath)
改為
chown(tarinfo, dirpath, '')
由於不知道怎么打開.py文件(就是這么菜),我是用記事本打開的orz
解決了orz
3.ipython notebook 安裝
裝pip。安裝方法:https://pip.pypa.io/en/latest/installing.html
然后 cmd運行 pip install jupyter notebook
啟動notebook :
在cmd運行 jupyter notebook,
然后再網址輸localhost:8888,會彈出一個頁面要你輸token。
打開后界面大概是這樣的

Ipython notebook里的文檔在哪呢?
在notebook里右上New,拖下來點python 3, 彈出一個新的可以輸入的窗口,然后輸入
import os print os.getcwd()
運行得到

輸出的就是ipython notebook 文件存的地址。
最后一點。。。應該不會有人和我一樣在運行ipython notebook時把cmd關了吧(怕不是個智障)( ̄ε(# ̄) Σ
4.Anaconda 安裝時路徑錯誤
裝python2.7
由於turi推薦裝anaconda最后一步就是IPython Notebook,
裝好python 2.7之后就不管其他的了,直接按照turi的步驟來。
Turi推薦的步驟:
Option 1: Install into Anaconda Python Environment (recommended)
Step 1:下載 Anaconda2 v4.0.0
Step 2: 安裝 Anaconda
安裝進度條到最后開始各種報錯QUQ
我已經不記得試過多少方法了_(:3」∠)_
最后一次安裝時 以管理員身份運行 好像可以解決 _(:3」∠)_
Step 3: Create conda environment
安裝成功后在cmd里運行
# Create a new conda environment with Python 2.7.x conda create -n gl-env python=2.7 anaconda=4.0.0
# Activate the conda environment activate gl-env
Step 4: Ensure pip version >= 7
# Ensure pip is updated to the latest version conda install pip conda update pip
Step 5: Install GraphLab Create
# Install your licensed copy of GraphLab Create pip install --upgrade --no-cache-dir https://get.graphlab.com/GraphLab-Create/2.1/注冊使用的郵箱/注冊時給的產品密鑰/GraphLab-Create-License.tar.gz
Step 4: Ensure installation of IPython and IPython Notebook
# Install or update IPython and IPython Notebook conda install ipython-notebook
不知道為什么 Step 5: Install GraphLab Create 后面是 Step 4: Ensure installation of IPython and IPython Notebook orz
全部成功安裝之后打開ipython notebook

5.最后 import graphlab。。。心好累啊_(:3」∠)_
在ipython notebook 里新建,然后 import graphlab

又出問題了(/TДT)/
不過上面有提示,按步驟來。
按要求先修改了C:\Anaconda2\envs\gl-env\lib\site-packages\graphlab的寫入權限。

然后運行
graphlab.get_dependencies()
Downloading xz.之后就不動了,等了20分鍾左右吧。

一堆報錯。

然后我只能再打開記事本試圖改程序(垂死掙扎)。。。
參考了博客:
http://blog.csdn.net/u013569000/article/details/53886656?locationNum=2&fps=1
簡單來說問題原因是因為網絡的問題下載包會多次失敗,無法安裝完整。
解決辦法就是找到 get_dependencies() 的源碼,然后直接從源碼里得到下載網址,手動下載,然后把源碼里的文件位置相應修改就可以了。
我試了下。
運行的程序是 C:\Anaconda2\envs\gl-env\Lib\site-packages\graphlab\dependencies.py ,打開,得到下載的網址。
(xzarchive_file, xzheaders) = urllib.urlretrieve('http://tukaani.org/xz/xz-5.2.1-windows.zip')
(dllarchive_file, dllheaders) = urllib.urlretrieve('http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gcc-libs-5.1.0-1-any.pkg.tar.xz')
下載了兩個安裝包,都放在E盤,然后改源碼
33 #(xzarchive_file, xzheaders) = urllib.urlretrieve('http://tukaani.org/xz/xz-5.2.1-windows.zip') #注釋掉 34 xzarchive_file = 'E:\\xz-5.2.1-windows.zip' 35 #xzarchive_dir = tempfile.mkdtemp()#注釋掉 36 xzarchive_dir = 'E:\';
43 #(dllarchive_file, dllheaders) = urllib.urlretrieve('http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gcc-libs-5.1.0-1-any.pkg.tar.xz') 44 dllarchive_file = 'E:\\mingw-w64-x86_64-gcc-libs-5.1.0-1-any.pkg.tar.xz' 45 #dllarchive_dir = tempfile.mkdtemp() 46 dllarchive_dir = 'E:\'
搞定,運行
然后Σ(  ̄□ ̄||)

這是為什么啊(/TДT)/ 連文件讀寫都會報錯了么(╯°口°)╯(┴—┴
換個地址試了下,把文件存在 E:\python_graphlab,修改源碼
#(xzarchive_file, xzheaders) = urllib.urlretrieve('http://tukaani.org/xz/xz-5.2.1-windows.zip') xzarchive_file = 'E:\python_graphlab\\xz-5.2.1-windows.zip' #xzarchive_dir = tempfile.mkdtemp() xzarchive_dir = 'E:\python_graphlab';
#(dllarchive_file, dllheaders) = urllib.urlretrieve('http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gcc-libs-5.1.0-1-any.pkg.tar.xz') dllarchive_file = 'E:\python_graphlab\\mingw-w64-x86_64-gcc-libs-5.1.0-1-any.pkg.tar.xz' #dllarchive_dir = tempfile.mkdtemp() dllarchive_dir = 'E:\python_graphlab'
然后…好了…

???某種玄學的神秘力量??
