AttributeError: the 'module' object does not have the 'SFrame' attribute

I am taking an 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 attribute (last last call) in ()

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

AttributeError: the 'module' object does not have the 'SFrame' attribute

How can I fix this error? I have example.csv people in the right way and there is no spelling error on SFrame. Any help is greatly appreciated. Thanks.

+8
python graphlab
source share
6 answers

Make sure the graphlab library is graphlab date and working with your current version of python. Changes in the built-in libraries from python from 2x to 3x can cause problems like this.

+2
source share

On your iPython / Jupyter laptop, follow these steps in that specific order.

  • This will lead to downloading and installing dependencies. graphlab.get_dependencies()
  • Restart the kernel: Kernel > Restart

  • Now import graphlab: import graphlab

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

Hope this helps. Hooray!

+17
source share

You need to restart the ipython kernel on your iPython / Jupyter laptop so that the graphic image is displayed in the appropriate places.

:

Kernel > Restart

and try again. Worked for me.

+1
source share

First you should run:

 import graphlab graphlab.product_key.set_product_key('your product key here') 

where product_key is the key you received by email after registering with turi.com with your Coursera credentials.

After this operation, everything will work fine.

+1
source share

Change it to:

 sf = graphlab.SFrame.read_csv('people-example.csv') 
0
source share

OK, I had the same problem today, and no one can help me ... but I finally found a solution to this problem ... first, when you write the code, make sure some important thing is 1- saf in sframe should be capital 2. The most important thing is when you write people. Example.csv write the first 4 letters and press ((press)), it will continue the word. and here you are all right :)

-2
source share

All Articles