python-2.7machine-learninggraphlabrecommendation-engine

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


I am trying with the recommender system,I have installed graphlab and got product key and all. After loading the dataset it shows all the info of dataset but when I try to use graphlab it is showing error AttributeError: 'module' object has no attribute 'SFrame'. I tried to restart kernel and update Conda as well.

AttributeErrorTraceback (most recent call last)
<ipython-input-8-d0e602ca53e0> in <module>()
      1 import graphlab
----> 2 train_data = graphlab.SFrame.read_csv('ratings_base')
      3 train_data = graphlab.SFrame.read_csv('ratings_test')

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

import graphlab
train_data = graphlab.SFrame.read_csv('ratings_base')
train_data = graphlab.SFrame.read_csv('ratings_test')

Solution

  • You might require to check if the library graphlab is updated and compatible with your current python version. Changes on built-in libraries from python 2x to 3x are likely to cause issues like this one.