I am a relatively new user of matplotlib but have come a long way in these last couple months. I developed some Python graph scripts on my Windows machine, which reports matplotlib version 0.98.5.2 (installed via Python(x,y)). These scripts write either .png or .pdf files, depending on how called; and they work fine in this environment.
Now that my scripts are suitable for running unattended, I’ve asked a Linux system administrator to install matplotlib on a Linux cluster which I use for my main application, and he did so from source. The version that is reported is 0.98.5.3.
When I run the script in the Linux environment, png files are written as intended, with no errors, but attempting to create pdf graphs generates the following error for the first occurrence of savefig:
[ac.jkerenyi@…2698… pygraph]$ ./run_pygraph.py pdf
Creating Top 100 V/C ratios graph…
Traceback (most recent call last):
File “./run_pygraph.py”, line 566, in
File “./run_pygraph.py”, line 369, in GraphTop100VC
File “/soft/python/lib/python2.6/site-packages/matplotlib/figure.py”, line 990, in savefig
File “/soft/python/lib/python2.6/site-packages/matplotlib/backend_bases.py”, line 1419, in print_figure
File “/soft/python/lib/python2.6/site-packages/matplotlib/backend_bases.py”, line 1311, in print_pdf
from backends.backend_pdf import FigureCanvasPdf # lazy import
File “/soft/python/lib/python2.6/site-packages/matplotlib/backends/backend_pdf.py”, line 44, in
from matplotlib import ttconv
ImportError: /soft/python/lib/python2.6/site-packages/matplotlib/ttconv.so: undefined symbol: _ZTVSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE
The expression “MaxVCRatios”+OutputImageType resolves to the string “MaxVCRatios.pdf” (confirmed by the second output line of the script, which was printed for testing purposes). I played with providing or omitting the format=“pdf” parameter and it made no difference. I’ve also searched for others with a similar issue and found none so I’m posting to this list to see if anyone can help. I need to know if this is a problem with my script, or if it’s something the system administrator needs to fix. Let me know if there’s any additional information you would like me to provide.
John Kerenyi, P.E.
Senior Traffic Engineer
City of Moreno Valley
14177 Frederick Street
P.O. Box 88005
Moreno Valley, CA 92552-0805
(951) 413-3141 fax