import graphlab failed in ipython2 notebook: ImportError: No module named graphlab

User 2591 | 11/12/2015, 11:55:10 PM

Hi Datos

Just started working w/ GL. I went through the installation procedure through anaconda and everything seems to work fine when I open a notebook downloaded from Coursera. However, when I create a new notebook, I get the error msg:

import graphlab

ImportError Traceback (most recent call last) <ipython-input-7-4b66ad388e97> in <module>() ----> 1 import graphlab

ImportError: No module named graphlab

Why would it work w/ an existing notebook but not with ones I just created? Don't you just hate a stumbling block like this on your first try?

Thank you for your help! SH

Python: 2.7.10 Jupyter notebook Mac OS: 10.8.5


User 2597 | 11/13/2015, 12:21:31 PM

I had the same issue, apparently grahplab got locked. in the folder C:\Users\userid.graphlab\artifacts There is a lockfile, a folder "lock.lock" if you delete the directory it will work again

User 15 | 11/13/2015, 9:30:51 PM


Are you opening a new notebook from the same conda environment? This is usually what's going on when this happens.

Did you install through Anaconda using the command line instructions?


User 2591 | 11/16/2015, 5:09:58 PM

Hi Evan

I use conda strictly when I am installing packages, and I never invoke anything from conda per se. However, having said that, here are my python paths:

/Users/howard/anaconda/bin/python /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2

The jupyter notebook supports multi-kernels: python3, python2, R, and pyspark. A new python2 notebook can import standard packages like sys, but chokes on pandas and graphlab, so clearly there is a jupyter issue. But since I have GL, I don't care about pandas as much.

Hopefully this helps with your the debug. Thank you for your support.

kind regards, SH

User 19 | 11/17/2015, 2:38:16 AM

Hi SH,

To help debug your situation, can you run the following from within your IPython session? !which python

This will give the path to the Python binary that's being used.

Thanks, Chris

User 2591 | 11/17/2015, 6:22:38 AM


which invokes python 3.4.3...

I need to explicitly issue python2 on CLI otherwise.

Since GLC only support Python 2.7, I can see this being a problem. But then again, that's why separate ipython kernel was created for python 2.7. And the notebook kernel is set to python 2.

Thank you for your help. SH

User 2591 | 12/3/2015, 1:01:00 AM

Well, I guess this thread is dead.

After tinkering w/ un/reinstallations a couple times, the only way I can get "import graphlab as gl" to work reliably is to manually issue

source activate dato-env

prior to firing off jupyter notebook. I ascertain that dato-env is in effect when my bash prompt changes to:


from just bash-3.2$

In case anyone might have similar problem.