Graphlab import and installation

User 2365 | 10/16/2015, 9:51:15 PM

Hi all,

How do i know if graph lab is installed correctly on my system? I get errors irrespective of which graph lab commands i run.

for example following ` sf = SFrames('people-example.csv')


NameError Traceback (most recent call last) <ipython-input-2-32b3296e2a0a> in <module>() ----> 1 sf = SFrames('people-example.csv')

NameError: name 'SFrames' is not defined ` Can you please help me ? Thank you

Rajesh

Comments

User 1207 | 10/16/2015, 10:13:30 PM

Hello Rajesh,

Are you able to import the graphlab module correctly? Python works with a module system (as described in https://docs.python.org/2/tutorial/modules.html), so all non-builtin commands must be imported before use. In your case, assuming you called import graphlab, it would also be graphlab.SFrame, not SFrames.

-- Hoyt


User 2365 | 10/17/2015, 9:26:50 AM

Hi, Now i tried with graph lab.SFrame I still get a runtime error. Can you please help me?

In [2]:

sf = graphlab.SFrame('people-example.csv') [INFO] This non-commercial license of GraphLab Create is assigned to der.rajesh@gmail.comand will expire on October 03, 2016. For commercial licensing options, visit https://dato.com/buy/.

[INFO] Start server at: ipc:///tmp/graphlabserver-21552 - Server binary: /Users/rajeshreddy/.graphlab/anaconda/lib/python2.7/site-packages/graphlab/unityserver - Server log: /tmp/graphlabserver1445073920.log [INFO] GraphLab Server Version: 1.6.1 Could not detect types. Using str for each column.


RuntimeError Traceback (most recent call last) <ipython-input-2-4df0be298ea8> in <module>() ----> 1 sf = graphlab.SFrame('people-example.csv')

/Users/rajeshreddy/.graphlab/anaconda/lib/python2.7/site-packages/graphlab/datastructures/sframe.pyc in init(self, data, format, proxy) 865 pass 866 else: --> 867 raise ValueError('Unknown input type: ' + format) 868 869 sframe_size = -1

/Users/rajeshreddy/.graphlab/anaconda/lib/python2.7/site-packages/graphlab/cython/context.pyc in exit(self, exctype, excvalue, traceback) 47 if not self.showcythontrace: 48 # To hide cython trace, we re-raise from here ---> 49 raise exctype(excvalue) 50 else: 51 # To show the full trace, we do nothing and let exception propagate

RuntimeError: Runtime Exception. No files corresponding to the specified path (/Users/rajeshreddy/people-example.csv).


User 1178 | 10/17/2015, 7:17:23 PM

Hi Rajesh,

Seems like the people-example.csv file does not exist in the folder you are working on. Can you check if you have downloaded the file? The file you have downloaded maybe a zip file, check if you have a file called people-example.zip in your download folder. If yes, please unzip that file and you will get people-example.csv.

Hope this helps! Ping


User 2365 | 10/17/2015, 11:01:18 PM

Hi Ping,

I have the people-example.csv file, it exists as .csv file. Do i need to copy it to a specific folder? I also tried giving the entire path. That doesn't work either

Thank you Rajesh


User 2365 | 10/19/2015, 8:07:06 AM

Hi Ping,

I uninstalled old pip and installed new pip and new graphlab-create It got installaed perfect now and i can access features of graphlab. Thank you

Have a nice day Rajesh


User 1178 | 10/19/2015, 4:50:59 PM

Thank you Rajesh! Glad your issue is resolved!

Ping