ImportError: undefined symbol: PyUnicodeUCS4_DecodeUTF8

User 9 | 3/20/2014, 3:01:58 AM

This was a prior post by Priya70. Thanks for the feedback! (moving to a separate thread)

Hi, followed the instructions to install GraphLab create on my Centos 6 linux machine and it looks like the installation was successful- but when I try to import it into python this is the error I see: In [2]: import graphlab


ImportError Traceback (most recent call last) in () ----> 1 import graphlab

/usr/local/lib/python2.7/site-packages/graphlab/init.py in () 5 """ 6 ----> 7 import graphlab.connect.aws as aws 8 9 from graphlab.data_structures.graph import Graph, Vertex, Edge

/usr/local/lib/python2.7/site-packages/graphlab/connect/aws/init.py in () 3 This module defines classes and global functions for interacting with Amazon Web Services. 4 """ ----> 5 from ec2 import getcredentials, launchEC2, setcredentials, status, terminate_EC2

/usr/local/lib/python2.7/site-packages/graphlab/connect/aws/ec2.py in () 14 15 import graphlab.productkey ---> 16 import graphlab.connect.server as glserver 17 import graphlab.connect.main as glconnect 18 from graphlab.connect.main import catchandlog

/usr/local/lib/python2.7/site-packages/graphlab/connect/server.py in () 4 """ 5 ----> 6 from graphlab.cython.ipc import PyCommClient as Client 7 from graphlabutil.config import DEFAULTCONFIG as defaultlocalconf 8 from graphlab.connect import getmetric_tracker

ImportError: /usr/local/lib/python2.7/site-packages/graphlab/cython/ipc.so: undefined symbol: PyUnicodeUCS4_DecodeUTF8

not sure what that means. thanks- Priya

Comments

User 9 | 3/20/2014, 3:03:09 AM

Here is the reply from Yucheng.

Your Python appears to have been compiled with 2-byte-wide unicode chars, while our module is compiled for 4-byte-wide unicode chars.

See: https://stackoverflow.com/questions/16871799/trying-to-import-a-module-undefined-symbol-pyunicodeucs4-decodeutf8 or http://docs.python.org/2.7/faq/extending.html#when-importing-module-x-why-do-i-get-undefined-symbol-pyunicodeucs2 .

The more common Python build is typically for 4-byte-wide unicode chars and we built against that.

Unfortunately, at the moment to resolve this issue will require you to recompile your Python with 4 byte Unicode. We will look harder at the portability problem for future releases.

Yucheng


User 1039 | 12/9/2014, 7:51:38 AM

do you have any plan to distribute graphlab-create compiled with 2-byte unicode? :)