Hi Mike, thanks for responding. I spent most of last night with this, re-installing Python using SuSE's package manager, re-installing matplotlib the same way. No joy. I tried downloading the matplotlib source and found that when I attempted to install, setup.py claimed I didn't have gtk available as a Python import. Checking this, I found it to be true although the installation directories are present. Re-installing gtk and things that depended on it had no effect - it still wont import.
Checking another machine, I found it worked ok with gtk, pylab and anything else I could test. The file versions and directory structures were the same. Following your UCS2 / UCS4 comments and a scroogle search, I found this: http://copia.ogbuji.net/blog/2006-01-09/Confusion_ sys.maxunicode is set to 65535 on the non-working installation. sys.unicode is set to 1114111 on the working installation! How did they become different? How can I get them to match? Following the link, a comment is made on http://copia.ogbuji.net/blog/2005-08-04/alt_unicod about site.py. >>> import site >>> site.__file__ b # thanks for the tip Mike! showed the working installation to point to '/usr/lib/python2.5/site.pyc' The non-working to '/usr/local/lib/python2.5.site.pyc' local? Maybe that's one of the leftovers from the source experiments I was doing. Checking sys.prefix on both installations shows the working machine to be '/usr', the non working, '/usr/local'. $ whereis python Generates thirteen results on the working installation, one of which refers to a /local/ type entry. The non-working installation shows fifteen entries, five of which contain '/local/. To be honest, I'm lost. I'd like to remove Python and re-install it, with all the modules I'm now using. Removing it with SuSE's package manager generates all sorts of problems with dependencies. Updating it has no effect. Is there a way to convince the system to start afresh (assuming that's the best approach), maybe removing the local settings? Thanks for your patience. Best regards, Mark. Michael Droettboom wrote: > I recently ran into a similar problem myself building stuff from source, > but I'm not sure of the specifics with SuSE and their packages etc. > > Python can be configured in two ways -- with two-byte (UCS2) or > four-byte (UCS4) Unicode characters. Apparently the default for a > source installation of Python is UCS2, but many (most) Linux > distributions build it for UCS4. Python extensions built for one > configuration can not be used with a Python built for the other > configuration. > > When Python extensions are built, if all goes well, they will match the > configuration of the Python interpreter. It looks like somehow you have > a mismatch between matplotlib and your Python interpreter. > > If you installed everything from packages, I would expect them all to > match (unless SuSE's quality control has really gone down as of late > ;). Perhaps something is still around from when you built things from > source. Did you at any point build your own Python? > > On a number of Linux distributions (probably including SuSE, but I don't > know for sure), things installed from source are under the /usr/local > tree. To diagnose this, you could see if anything is getting pulled in > from there (rather than from the packaged stuff, which wouldn't be under > /usr/local). For instance "whereis python", will tell you which python > is being used. When you import a Python module, you can use __file__ to > see where it was imported from. For example: > >>>> import pylab >>>> pylab.__file__ > > Hope that at least offers some next steps for tracking this down. > > Cheers, > Mike > > mark starnes wrote: >> Hi everyone, >> >> I'm running Suse10.2 and installing packages using Yast (after much pain >> trying to install Numpy and Scipy without it!). After installing (and >> re-installing) Matplotlib in this way, I get the error, >> >> ImportError: matplotlib/ft2font.so: undefined symbol: >> PyUnicodeUCS4_GetSize >> >> when I attempt to import pylab. >> >> Can anybody help me fix this? I couldn't find any help on the >> matplotlib site and my .matplotlib directory is empty. >> >> Oh, I'm also a bit new to Linux - please be patient! >> >> Thanks in advance, >> >> Mark. >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> Matplotlib-users mailing list >> Matplotlib-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users