FS#21702 - python-matplotlib refers to Python 2.6 path
Attached to Project:
Community Packages
Opened by Thomas Dahms (thomasd) - Monday, 15 November 2010, 10:03 GMT
Last edited by Ionut Biru (wonder) - Monday, 15 November 2010, 10:17 GMT
Opened by Thomas Dahms (thomasd) - Monday, 15 November 2010, 10:03 GMT
Last edited by Ionut Biru (wonder) - Monday, 15 November 2010, 10:17 GMT
|
Details
Description:
Python 2.6 has gone a while ago, but matplotlib looks for fonts in /usr/lib/python2.6/site-packages/matplotlib/mpl-data/fonts/ttf/ when saving plots as pdf. See attached testcase.py. If I run this as "./testcase.py > test.pdf" it says: Traceback (most recent call last): File "./testcase.py", line 10, in <module> plt.savefig(sys.stdout, format='pdf') File "/usr/lib/python2.7/site-packages/matplotlib/pyplot.py", line 363, in savefig return fig.savefig(*args, **kwargs) File "/usr/lib/python2.7/site-packages/matplotlib/figure.py", line 1084, in savefig self.canvas.print_figure(*args, **kwargs) File "/usr/lib/python2.7/site-packages/matplotlib/backend_bases.py", line 1886, in print_figure **kwargs) File "/usr/lib/python2.7/site-packages/matplotlib/backend_bases.py", line 1696, in print_pdf return pdf.print_pdf(*args, **kwargs) File "/usr/lib/python2.7/site-packages/matplotlib/backends/backend_pdf.py", line 2156, in print_pdf self.figure.draw(renderer) File "/usr/lib/python2.7/site-packages/matplotlib/artist.py", line 55, in draw_wrapper draw(artist, renderer, *args, **kwargs) File "/usr/lib/python2.7/site-packages/matplotlib/figure.py", line 798, in draw func(*args) File "/usr/lib/python2.7/site-packages/matplotlib/artist.py", line 55, in draw_wrapper draw(artist, renderer, *args, **kwargs) File "/usr/lib/python2.7/site-packages/matplotlib/axes.py", line 1934, in draw a.draw(renderer) File "/usr/lib/python2.7/site-packages/matplotlib/artist.py", line 55, in draw_wrapper draw(artist, renderer, *args, **kwargs) File "/usr/lib/python2.7/site-packages/matplotlib/axis.py", line 1017, in draw tick.draw(renderer) File "/usr/lib/python2.7/site-packages/matplotlib/artist.py", line 55, in draw_wrapper draw(artist, renderer, *args, **kwargs) File "/usr/lib/python2.7/site-packages/matplotlib/axis.py", line 234, in draw self.label1.draw(renderer) File "/usr/lib/python2.7/site-packages/matplotlib/artist.py", line 55, in draw_wrapper draw(artist, renderer, *args, **kwargs) File "/usr/lib/python2.7/site-packages/matplotlib/text.py", line 524, in draw bbox, info = self._get_layout(renderer) File "/usr/lib/python2.7/site-packages/matplotlib/text.py", line 298, in _get_layout ismath=False) File "/usr/lib/python2.7/site-packages/matplotlib/backends/backend_pdf.py", line 1781, in get_text_width_height_descent font = self._get_font_ttf(prop) File "/usr/lib/python2.7/site-packages/matplotlib/backends/backend_pdf.py", line 1817, in _get_font_ttf font = FT2Font(str(filename)) RuntimeError: Could not open facefile /usr/lib/python2.6/site-packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf; Cannot_Open_Resource Commenting in the matplotlib.rc line to use the real LaTeX, it runs fine. Additional info: * package version(s) python-dateutil 1.5-2 python-matplotlib 1.0.0-4 python-numpy 1.5.0-2 python-pytz 2010h-2 python-scipy 0.8.0-4 python2 2.7-3 * config and/or log files etc. Steps to reproduce: See above. Run "./testcase.py > test.pdf" |
This task depends upon
Closed by Ionut Biru (wonder)
Monday, 15 November 2010, 10:17 GMT
Reason for closing: Duplicate
Additional comments about closing: FS#21340
Monday, 15 November 2010, 10:17 GMT
Reason for closing: Duplicate
Additional comments about closing: