AttributeError: 'module' object has no attribute 'SFrame'

Lotus picture Lotus · Aug 14, 2016 · Viewed 14k times · Source

I am taking ML course in Coursera and I have installed GraphLab Create and ipython notebook.I am new to ML and python.

I get the following error,

import graphlab
sf = graphlab.SFrame('people-example.csv')

AttributeError Traceback (most recent call last) in ()

----> 1 sf = graphlab.SFrame('people-example.csv')

AttributeError: 'module' object has no attribute 'SFrame'

How do I fix this error?I have the people-example.csv in the correct path and no spelling mistake on SFrame Any help is greatly appreciated.Thank you.

Answer

Maverick picture Maverick · Aug 16, 2016

In your iPython/Jupyter notebook follow these steps in this particular order.

  1. This will download and install dependencies. graphlab.get_dependencies()
  2. Restart Kernel : Kernel > Restart

  3. Now import graphlab: import graphlab

  4. sf = graphlab.SFrame('people-example.csv')

Hope this helps. Cheers!