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

一个人想着一个人 提交于 2019-12-03 02:28:06

Make sure the library graphlab is updated and works with your current python version. Changes on built-in libraries from python 2x to 3x are likely to cause issues like this one.

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!

Артем Кириллов

At first, you should run:

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

where product_key is a key you received to your email after registering on turi.com with your Coursera credentials.

After this operation everything's going to work fine.

You need to restart the ipython kernel on your iPython/Jupyter notebook for graphlab to see the dependencies in the correct locations.

menu options:

Kernel > Restart

and try again. Worked for me.

Change it to:

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

ok i was having the same problem today and no one can help me ... but i finally found the solution of this problem .... first when you write the code make sure of some important thing 1- s an f in sframe must be capital 2- the most important when you writing people-example.csv write first 4 letters and hit ((tap)) it will continue the word . and here you are every thing is ok :)

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!