knight91
2015-08-07 20:50:44 UTC
Python claims to be unable to import pyplot. Apart from that, it has been
running absolutely fine.
I tried different versions of matplotlib, the one provided in my package
manager (apt-get) and two (stable & last stable) releases compiled from
source. I reinstalled all packages containting "python" on my system (Ubuntu
14.04 LTS). This error still occurs and prevents me from using pyplot.
What should I try next?
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
File "<stdin>", line 1, in <module>
File "/usr/lib/pymodules/python2.7/matplotlib/pyplot.py", line 24, in
<module>
import matplotlib.colorbar
File "/usr/lib/pymodules/python2.7/matplotlib/colorbar.py", line 29, in
<module>
import matplotlib.collections as collections
File "/usr/lib/pymodules/python2.7/matplotlib/collections.py", line 23, in
<module>
import matplotlib.backend_bases as backend_bases
File "/usr/lib/pymodules/python2.7/matplotlib/backend_bases.py", line 50, in
<module>
import matplotlib.textpath as textpath
File "/usr/lib/pymodules/python2.7/matplotlib/textpath.py", line 11, in
<module>
import matplotlib.font_manager as font_manager
File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line 1356,
in <module>
_rebuild()
File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line 1341,
in _rebuild
fontManager = FontManager()
File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line 1008,
in __init__
self.afmlist = createFontList(self.afmfiles, fontext='afm')
File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line 563, in
createFontList
font = afm.AFM(fh)
File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 342, in __init__
parse_afm(fh)
File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 330, in
parse_afm
dcmetrics_ascii, dcmetrics_name = _parse_char_metrics(fh)
File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 203, in
_parse_char_metrics
bbox = _to_list_of_floats(vals[3][2:])
File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 69, in
_to_list_of_floats
return [_to_float(val) for val in s.split()]
ValueError: invalid literal for float(): 19#
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Error-when-importing-pyplot-from-matplotlib-invalid-literal-for-float-19-tp46000.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
running absolutely fine.
I tried different versions of matplotlib, the one provided in my package
manager (apt-get) and two (stable & last stable) releases compiled from
source. I reinstalled all packages containting "python" on my system (Ubuntu
14.04 LTS). This error still occurs and prevents me from using pyplot.
What should I try next?
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
from matplotlib import pyplot
Traceback (most recent call last):File "<stdin>", line 1, in <module>
File "/usr/lib/pymodules/python2.7/matplotlib/pyplot.py", line 24, in
<module>
import matplotlib.colorbar
File "/usr/lib/pymodules/python2.7/matplotlib/colorbar.py", line 29, in
<module>
import matplotlib.collections as collections
File "/usr/lib/pymodules/python2.7/matplotlib/collections.py", line 23, in
<module>
import matplotlib.backend_bases as backend_bases
File "/usr/lib/pymodules/python2.7/matplotlib/backend_bases.py", line 50, in
<module>
import matplotlib.textpath as textpath
File "/usr/lib/pymodules/python2.7/matplotlib/textpath.py", line 11, in
<module>
import matplotlib.font_manager as font_manager
File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line 1356,
in <module>
_rebuild()
File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line 1341,
in _rebuild
fontManager = FontManager()
File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line 1008,
in __init__
self.afmlist = createFontList(self.afmfiles, fontext='afm')
File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line 563, in
createFontList
font = afm.AFM(fh)
File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 342, in __init__
parse_afm(fh)
File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 330, in
parse_afm
dcmetrics_ascii, dcmetrics_name = _parse_char_metrics(fh)
File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 203, in
_parse_char_metrics
bbox = _to_list_of_floats(vals[3][2:])
File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 69, in
_to_list_of_floats
return [_to_float(val) for val in s.split()]
ValueError: invalid literal for float(): 19#
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Error-when-importing-pyplot-from-matplotlib-invalid-literal-for-float-19-tp46000.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
------------------------------------------------------------------------------