Python GraphLab in Anaconda

In this tutorial I wrote down my own steps on how to configure GraphLab on Mac for the Coursera Machine Learning class from the University of Washington:
Starting from the very beginning...

Check your Anaconda


If you do NOT have conda installed, then download it here (Python 3.6 version),
you can always downgrade to 2.7 later.

Sign up to Anaconda cloud:

https://anaconda.org

$ conda --version

conda 4.5.11

Conda update all packages



Even if you installed the newest Anaconda, there will be a ton of changes..

$ conda update --all

Check if you may already have Python 2.7 environment

$ conda env list
# conda environments:
base * /Volumes/DATA/anaconda3


Python Version

You need to work in anaconda=4.0.0 Python 2.7

Without conda you have:
$ python --versionPython 2.7.10


switching to conda:
$ source activate base(base) uki 19:29 ~ $ python --version
Python 3.6.6 :: Anaconda, Inc.

Create the new environment with Python 2.7 anaconda=4.0.0




 $ conda create -n py2 python=2.7.15


List available environments


$ conda env list# conda environments:
base * /Volumes/DATA/anaconda3
py27 /Volumes/DATA/anaconda3/envs/py2

$ source activate py27(py27) uki  19:34 ~ $ python --versionPython 2.7.15 :: Anaconda, Inc.

The actual installation of GraphLab


$ pip install --upgrade --no-cache-dir https://get.graphlab.com/GraphLab-Create/2.1/YOUR_EMAIL/YOUR_LICENSE_FROM_TURI/GraphLab-Create-License.tar.gz


Installing Jupiter kernel to support GraphLab and Python 2.7




$ python -m pip install ipykernel



$ python -m ipykernel install --user --name py2 --display-name "Python (py2.7.15)"Installed kernelspec py2 in /Users/uki/Library/Jupyter/kernels/py2


$ cd SOME SRC ROOT FOLDER OF YOUR NOTEBOOK(py27) uki  19:41 Week3 $ jupyter notebook


Inside jupyter notebook execute:

import graphlab

if the installation was correct it will work (no output), if not you will see:

ImportError: No module named graphlab




As an Amazon Associate I earn from qualifying purchases.

My favorite quotations..


“A man should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.”  by Robert A. Heinlein

"We are but habits and memories we chose to carry along." ~ Uki D. Lucas


Popular Recent Articles