ImportError: build without an error, but python simple_plot.py got an ImportError

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

undefined symbol: PyUnicodeUCS2_AsEncodedString

http://docs.python.org/faq/extending#when-importing-module-x-why-do-i-get-undefined-symbol-pyunicodeucs2

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
http://www.iki.fi/jks