undefined symbol: _PyUnicodeUCS4_AsDefaultEncodedString

Skip Montanaro skip at pobox.com
Mon Feb 3 12:41:27 EST 2014


For various reasons at work, we get Python from a third party. I just
installed VTK for OpenSuSE on one of my desktop machines using zypper.
When I import it from /usr/bin/python (2.7.3), the import works just
fine. When I try to import it from our vendor-provided Python (2.7.2),
I get this traceback:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/vtk/__init__.py", line 41, in <module>
    from vtkCommonPython import *
ImportError: /usr/lib64/libvtkPythonCore.so.5.10: undefined symbol:
_PyUnicodeUCS4_AsDefaultEncodedString

I think this means that at configure time, OpenSuSE and our vendor
chose different values for the --enable-unicode option. Is that
correct?

If so, I have a few questions:

1. Is there a workaround short of rebuild one version of Python or the other?

2. Does the flexible string representation avoid this problem?

3. Which builder (OpenSuSE or our vendor) decided the default wasn't
good enough?

Thx,

Skip



More information about the Python-list mailing list