lambda apply error

User 435 | 7/4/2014, 6:27:54 PM

Hi,

Today I downloaded GC 0.3 for a try. I installed it on my computer with the following specs (no previous installation): - ubuntu 12.04 with 16gb ram - anaconda python distribution (latest with python 2.7) - installed with pip install graphlab-create==0.3

I tried to write a simple script to get familiar with graphlab and got some error at the begining. Here is the code:

import graphlab as gl adat=gl.SFrame.read_csv('...path to a csv...',delimiter=';') adat['valami']=adat['columnx'].apply(lambda x: 10)

The script above runs without error, but when I try to ask the column names or just take a look at the head I get the following error and I can not use the 'adat' object anymore: <repr(<instancemethod at 0x7f4ed04e5d20>) failed: RuntimeError: Runtime Exception: 0. Runtime Exception: 0. Traceback (most recent call last): File "/home/bgy/anaconda/lib/python2.7/pickle.py", line 1382, in loads return Unpickler(file).load() File "/home/bgy/anaconda/lib/python2.7/pickle.py", line 858, in load dispatchkey File "/home/bgy/anaconda/lib/python2.7/pickle.py", line 1090, in loadglobal klass = self.findclass(module, name) File "/home/bgy/anaconda/lib/python2.7/pickle.py", line 1124, in findclass import(module) File "/home/bgy/anaconda/lib/python2.7/site-packages/graphlab/init.py", line 7, in <module> import graphlab.connect.aws as aws File "/home/bgy/anaconda/lib/python2.7/site-packages/graphlab/connect/init.py", line 7, in <module> from graphlabutil.config import DEFAULTCONFIG as defaultlocalconf File "/home/bgy/anaconda/lib/python2.7/site-packages/graphlabutil/init.py", line 4, in <module> import logging.config File "/home/bgy/anaconda/lib/python2.7/logging/config.py", line 29, in <module> import io File "/home/bgy/anaconda/lib/python2.7/io.py", line 51, in <module> import io ImportError: /home/bgy/anaconda/lib/python2.7/lib-dynload/io.so: undefined symbol: PyLongAsInt

If I write adat['valami']=10, that works. The lamba x: 10 is just a sample, nothing works with lambda, the result is the same.

Any suggestion?

Thanks Gyula

Comments

User 14 | 7/5/2014, 5:00:20 AM

Hi,

It looks like you have a different python distribution (from anaconda), which GraphLab Create does not support yet. Please try using a regular python 2.7 distribution in a virtualenv.

Thanks, -jay


User 435 | 7/5/2014, 7:16:39 PM

Hi,

Thank you for the help! I had tried in a native environment in a virtual machine and it worked. Do you plan to support anaconda distribution in the future?

Thanks Gyula


User 14 | 7/7/2014, 2:55:20 AM

Yes, supporting anaconda distribution is on our road map. However, your problem could be a conda distribution issue. A quick search of the error message shows that the problem of undefined symbol in conda is not uncommon.


User 1251 | 4/28/2015, 3:54:39 AM

Is there a recommended way to install graphlab with the Anaconda Python distribution? Just pip install graphlab-create or is there something that uses anaconda's package and dependency management?