ImportError: build without an error, but python got an ImportError

jgsedi <jgsedi@...885...> writes:

undefined symbol: PyUnicodeUCS2_AsEncodedString

Python can be built to use either UCS-2 or UCS-4. You are trying to use
a module compiled with one of these options on a Python compiled with
the other, and that ImportError is Python's way of telling you that this
cannot work.

Please double-check that you are running your test with the same Python
binary that you built matplotlib with. You mentioned in your message
that you rebuilt matplotlib, but did you install that rebuilt version
and test on it, or were you accidentally using a version compiled
against a different Python binary?


Jouni K. Sepp�nen